title: Mocking an abstract class and injecting classes with Mockito annotations?
body: <p>Is it possible to both mock an abstract class and inject it with mocked classes using Mockito annotations. I now have the following situation:</p>
  
  <pre><code>@Mock private MockClassA mockClassA;
  @Mock private MockClassB mockClassB;
  
  @Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractClassUnderTest abstractClassUnderTest;
  
  @Before
  public void init() {
      MockitoAnnotations.initMocks(this);
      Whitebox.setInternalState(abstractClassUnderTest, mockClassA);
      Whitebox.setInternalState(abstractClassUnderTest, mockClassB);
  }
  </code></pre>
  
  <p>I'd like to use something like @InjectMocks on AbstractClassUnderTest but it can't be used in combination with @Mock. The current situation, with Whitebox from Powermock, works but I'm curious if it's possible to solve it with just annotations. I couldn't find any solutions or examples.</p>
  
  <p>(I know about the objections to test abstract classes and I'd personally rather test a concrete implementation and just use @InjectMocks.)</p>