title: @PostConstruct not called when using Mockito @Spy annotation
body: <p>I am using Spring, TestNG and Mockito frameworks. I am writing a unit test for a class <em>A</em> that has a dependency on class <em>B</em>. Class <em>B</em> has a method annotated with <code>@PostConstruct</code>.</p>
  
  <p>While writing Unit test case using TestNG for class <em>A</em>, I am annotating an instance of class <em>B</em> with Mockito <code>@Spy</code> in the test class. I can see the instance of <em>B</em> being created properly by Mockito. But <strong>why</strong> <code>@PostConstruct</code> code <strong>is not called</strong> when Mockito is processing <code>@Spy</code> annotation?</p>
  
  <p>So, what I have done is I moved the code inside <code>@PostConstruct</code> to the <em>constructor</em>.</p>
  
  <p>Is there any way to make Mockito execute any 'Post-processing' method while processing <code>@Spy</code> annotation?</p>
  
  <p>Appreciate any help on this.</p>