title: JUnit/Mockito: ArgumentCaptor running before the JUnit test executes?
body: <p>I have JUnit test such as follows:</p>
  
  <pre><code>@Autowired
  MyService myservice;
  
  @Before
  public void init() {
     myservice.doStuff(new MyObj());
  }
  
  @Test
  public void test() {
     ArgumentCaptor&lt;MyObj&gt; captor = ArgumentCaptor.forClass(MyObj.class);
     myservice.doStuff(new MyObj());
     verify(myservice, atLeastOnce()).doStuff(captor.capture());
     captor.getAllValues(); //this returns 2 - one for the @Before and one for right above
  }
  </code></pre>
  
  <p>As mentioned in the commented code, the captor captures both invocation even though the captor is created after the @Before. Why is this and how can I capture only invocation within the test ?</p>