title: Cannot use mocked function calls in parameters of verify: too many invocations
body: <p>The setup is as follows:</p>
  
  <pre><code>//call doA a bunch of times, call doB once using some value that depends on doA()
  verify(mockedThing).doB(eq(mockedThing.doA())); //removing eq() changes nothing
  </code></pre>
  
  <p>Obviously, <code>doA()</code> is configured to return some value, and <code>mockedThing</code> is indeed mocked. The result is: mockito complains that I call <code>doA</code> (Emphasis here: NOT <code>doB</code>!) too often, and that it expected it to be called only once!</p>
  
  <p>The following change works:</p>
  
  <pre><code>int result = mockedThing.doA() 
  verify(mockedThing).doB(eq(result));
  </code></pre>
  
  <p>My question is simple: what is going on here? Why is Mockito verifying the call to the <em>parameters</em> I pass to the function rather than the calls to the function itself?</p>