title: Mockito with transactional annotated method
body: <p>We've got a class with a method with an transactional annotation</p>
  
  <pre><code>public class MyHandler extends BaseHandler {
  
      @Transactional
      public void annotatedMethod(String parameter) throws Exception {
      }
  </code></pre>
  
  <p>As soon as we try to make a test using mockito and its annotations</p>
  
  <pre><code>@InjectMocks
  private Controller controller;
  
  @Mock
  private MyHandler myHandler;
  </code></pre>
  
  <p>we have a null pointer exception when executing the following line</p>
  
  <pre><code>Mockito.doCallRealMethod().when(myHandler).annotatedMethod(Matchers.any());
  </code></pre>
  
  <p>We have tried to use the same solution as in <a href="https://stackoverflow.com/questions/12857981/transactional-annotation-avoids-services-being-mocked">Transactional annotation avoids services being mocked</a> with no luck.</p>
  
  <p>We're new with mockito, we have no idea how to solve this.
  Any clues?</p>
  
  <p>Thank you very much,
  Elena</p>