@@ -0,0 +1,986 @@
+package io.github.walterinsh.mock;%0A%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.testng.annotations.Test;%0A%0Aimport java.util.List;%0A%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.testng.Assert.assertEquals;%0A%0A/**%0A * Created by Walter on 12/4/15.%0A */%0Apublic class TrackParameter %7B%0A%0A    @Test%0A    public void trackParam() throws Exception %7B%0A        ArgumentCaptor%3CInteger%3E captor = ArgumentCaptor.forClass(Integer.class);%0A        CharSequence argument = mock(CharSequence.class);%0A%0A        new TargetClass().targetMethod(argument);%0A%0A        verify(argument).subSequence(captor.capture(), captor.capture());%0A%0A        List%3CInteger%3E capturedValues = captor.getAllValues();%0A        assertEquals(capturedValues.get(0).intValue(), 1);%0A        assertEquals(capturedValues.get(1).intValue(), 4);%0A    %7D%0A%0A    class TargetClass %7B%0A%0A        public void targetMethod(CharSequence argument) %7B%0A            argument.subSequence(1, 4);%0A        %7D%0A    %7D%0A%0A%7D%0A

add argument capture example