title: Calling a method on Mock object is calling real method instead of mocked implementation
body: <p>I have my code like below</p>
  
  <pre><code>public process() {
      extract();
      ...
  }
  
  private Obj extract() {
      Constructor const = new Constructor();
      Obj object = const.getOBJMethod("12345","c:/file/a.zip",null);
      return object;
  }
  </code></pre>
  
  <p>I am testing the method process using mockito.
  and in my test class I have written code as</p>
  
  <pre><code>Constructor mocckConst = mock(Constructor.class);
  Obj mockObject = mock(Obj.class);
  when(mocckConst .getOBJMethod("12345","c:/file/a.zip",null).thenReturn(mockObject);
  </code></pre>
  
  <p>But while execution of testcase when extract method is called it is going to the real implementation of getOBJMethod().</p>
  
  <p>Constructor class has another inner class. Does that cause any problem?
  Can anybody tell me what is going wrong here and the solution.</p>
  
  <p>I would like to improvise my process method.</p>
  
  <pre><code>public process(String base) {
      if("abc".equals(base)) {
         ---
      }
      else if("def".equals(base) {
      extract();
      ---
      }
  }
  </code></pre>
  
  <p>This way extract() is called only when basis is def. and I don't want to pass constructor object to process() method then are there any solutions?</p>