title: Why does thenCallRealMethod() lose the arguments here?
body: <p>I have the following code:</p>
  
  <pre><code>when(mockedOperation.getResult(anyDouble(), anyDouble())).thenCallRealMethod();
  when(mockedOperation.division(anyDouble(), not(eq(0d)))).thenCallRealMethod();
  </code></pre>
  
  <p>Where <code>Operation</code> is something like <code>Command</code> pattern - it encapsulates some concrete action, in this case, simplified - division operation. The result retrieval happens not directly, but by the means of contract method, say <code>getResult(arg1, arg2)</code>. So, I call </p>
  
  <pre><code>  mockedOperation.division(10d, 3d);
  </code></pre>
  
  <p>But (from debugging info in my concrete implementation of <code>Operation</code>) I can see that <code>division()</code> gets not <code>10</code> and <code>3</code> but <code>(0, 0)</code>.</p>
  
  <p>As far as I understand, that arguments are lost somewhere between the <code>thenCallRealMethod()</code> by <code>getResult()</code> and calling <em>real</em> <code>division()</code> afterwards.</p>
  
  <p>What is the reason for that behavior and how should I implement partial mocks correctly in case I really need it?</p>
  
  <p>UPD. Maybe I should try to say it another way, for example, simply how do you create mocks that <code>callRealMethod</code> in such a way that arguments are correctly delivered to the endpoint?</p>