title: Partial mocking in mockito - force method into exception and continue
body: <p>I have a method with some logic and an exception block and would like to test the contents in the exception block.</p>
  
  <p>Method:</p>
  
  <pre><code>Class Validator() {
  
      protected Validator(blah,blah) {
  
      }
  
      protected boolean doStuff(String a, String b) {
  
          try {
            isValidInput(a){
          } catch (Exception e) {
              b = "unknown error"
          }
      }
  </code></pre>
  
  <p>test case:</p>
  
  <pre><code>@Test
  public void testException() {
  
  Validator testValidator = new testValidator(blah, blah);
  
          Validator spy = spy(testValidator);
          String var2 = "unknown error"
          doReturn(new Exception()).when(spy.doStuff(var1, var2));
  
          assertEquals("unknown error", var2);
  }
  </code></pre>
  
  <p>How can I force the real method to go into exception block and continue stubbing?</p>