title: Mockito, Verify one of the method call among several
body: <p>I am writing a Junit test with mockito and I want to verify a method call is made. Problem is there are multiple method calls made with different parameters and I want to verify only one of those . </p>
  
  <pre><code>Eg : Below are 3 method calls from my code
  Metrics.emit(PhoneFailCount,0);
  Metrics.emit(PaymentFailCount,1);
  Metrics.emit(AddresseFailCount,1);
  </code></pre>
  
  <p>How do I verify that </p>
  
  <p><code>Metrics.emit(PaymentFailCount,1)</code> is called atleast once.</p>
  
  <p>If I directly do 
  <code>verify(Metrics).emit(PaymentFailCount, 1)</code> 
  it throws error saying Argument(s) are different! because its trying to match with Metrics.emit(PhoneFailCount,0)</p>
  
  <p>I tried using ArgumentCaptor but is not possible to capture both parameters at once </p>
  
  <p>Thanks</p>