title: Mockito - separately verifying multiple invocations on the same method
body: <pre><code>import static org.mockito.Mockito.atLeastOnce;
  import static org.mockito.Mockito.verify;
  
  import org.mockito.ArgumentCaptor;
  import org.mockito.Mockito;
  
  
  public class MockitoTest {
  
  
      public static class TestMock {
          public void doIt(String s) {
          }
      }
  
      public static void main(String[] args) {
          TestMock mock = Mockito.mock(TestMock.class);
          mock.doIt("1");
          mock.doIt("2");
  
          ArgumentCaptor&lt;String&gt; argument = ArgumentCaptor.forClass(String.class);
          verify(mock, atLeastOnce()).doIt(argument.capture());
          System.out.println(argument.getValue());
          verify(mock, atLeastOnce()).doIt(argument.capture());
          System.out.println(argument.getValue());
      }
  }
  </code></pre>
  
  <p>I expected this to print <code>1 2</code> but it instead prints <code>2 2</code>. It seems the '1' invocation is lost. Is there a way that I can verify that verifications happened with <code>1</code> and then <code>2</code>?</p>