title: Mockito- calling real method
body: <p>I have a class which has 2 methods. I want to mock the class and then mock the first method but not the 2nd one.</p>
  
  <p>e.g.</p>
  
  <pre><code>class C {
   void m1() { ...}
   boolean m2() { ... return flag;}
  }     
  </code></pre>
  
  <p>unit test code:</p>
  
  <pre><code>C cMock = Mockito.mock(C.class);
  Mockito.doNothing().when(cMock).m1();
  Mockito.when(cMock.m2()).thenCallRealMethod();
  </code></pre>
  
  <p>The strange thing is that m2 is not being called.</p>
  
  <p>do I miss anything here?</p>