title: Spring @Value annotation not working with mockito mock
body: <p>I am using spring <code>@Value</code> annotation and setting values for some fields in class <code>A</code>.</p>
  
  <p>I am writing unit tests for this class <code>A</code>. In the test class, I am annotating the reference for class <code>A</code> with Mockito <code>@Spy</code>. I am setting the values as system properties and then invoking <code>MockitoAnnotations.initMocks(this).</code> </p>
  
  <p>My expectation is the spied object will have the fields initialized with the values from system properties via <code>@Value</code> annotation. But this is not happening.</p>
  
  <p>Please anybody could explain? </p>