title: checked exception is invalid for this method
body: <p>I have the below class
  There is an answer to this in StackOverflow but it deals with List <a href="https://stackoverflow.com/questions/3762047/throw-checked-exceptions-from-mocks-with-mockito">throw checked Exceptions from mocks with Mockito</a>. I like to look into this condition. Not getting where I am missing.</p>
  <pre><code>public SimpleClass{                                                         
      private SimpleClass() {}                                                    
      public void runMethod(request,String,Map,Object,Object) {                   
          try {                                                                  
              doesSomething()....                                                
          }                                                                      
      }                                                                          
      catch(Exception e) {                                                        
          String message = &quot;&quot; + request.getAttribute(X) + &quot;Some message&quot;;        
          Logger.Log(param1 + param2 + message);                                 
      }                                                                          
  }
  </code></pre>
  <p>My Test method looks like below. I trying to run the coverage with the JUnit but the Catch Block is not covered, so Wrote the below test method. It throws the below exception. Not able to get where I am missing.</p>
  <pre><code>public class SimpleClassTest{                                               
      @Test                                                                   
      public void testCatchBlock() {                                           
          SimpleClass instanceObj = PowerMockito.mock(SimpleClass.class);     
          Mockito.doThrow(new Exception())                                    
                  .when(instanceObj)                                           
                  .runMethod(request, anyString(), anyMap(), anyObject(), anyObject());
      }                                                                       
  }
  </code></pre>
  <p><strong>Exception Thrown</strong></p>
  <pre><code>org.mockito.exceptions.base.MockitoException: 
  Checked exception is invalid for this method!
  Invalid: java.lang.Exception
  </code></pre>
  <p><strong>Edit</strong></p>
  <p>I am able to run the method by giving NullPointerException. When I try for code coverage with Junit, the catch block is completely shown as red, and the catch phrase is shown yellow. How do I achieve 100% coverage and how to test the String message in the catch block.</p>