title: Inject Mocks for objects created by Factory classes
body: <p>I have the following class:</p>
  
  <pre><code>public class MyClass {        
      private Apple apple;
  
      public void myMethod() {
         apple = AppleFactory.createInstance(someStringVariable);
         ....
         ....
         ....
      }
  }
  </code></pre>
  
  <p>And the Test class:</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class MyClassTest {
  
          @InjectMocks 
          MyClass myClass;
  
          @Test
          public void myMethod(){
           ...
           ...
           ...
          }
      }
  </code></pre>
  
  <p>How could I inject an Apple instance as a mock in MyClass?</p>