I have the following line in my test:
Capture<MyType> myCapture = Capture.newInstance();
expect(myMockedObject.myMethod(capture(myCapture)).andReturn(...).times(2);
This expectation passes when the mocks are verified but myCapture.getValues().size()
returns 1. I am expecting a capture for each method call. How can I capture the arguments to both method calls?