title: Mockito: Inject real objects into private @Autowired fields
body: <p>I'm using Mockito's <code>@Mock</code> and <code>@InjectMocks</code> annotations to inject dependencies into private fields which are annotated with Spring's <code>@Autowired</code>:</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class DemoTest {
      @Mock
      private SomeService service;
  
      @InjectMocks
      private Demo demo;
  
      /* ... */
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public class Demo {
  
      @Autowired
      private SomeService service;
  
      /* ... */
  }
  </code></pre>
  
  <p>Now I would like to also inject <strong>real</strong> objects into private <code>@Autowired</code> fields (without setters). Is this possible or is the mechanism limited to injecting Mocks only?</p>