}
@Test
public void captures_correclty_when_captor_used_multiple_times() throws Exception {
// given
IMethods mock = mock(IMethods.class);
ArgumentCaptor<String> argumentCaptor = ArgumentCaptor.forClass(String.class);
// when
mock.mixedVarargs(42, "a", "b", "c");
// then
// this is only for backwards compatibility. It does not make sense in real to do so.
verify(mock).mixedVarargs(any(), argumentCaptor.capture(), argumentCaptor.capture(), argumentCaptor.capture());
Assertions.assertThat(argumentCaptor.getAllValues()).containsExactly("a", "b", "c");