public class Test{ @Mock private Service service; @Captor private ArgumentCaptor<ArrayList<SomeType>> captor; @Before public void init(){ MockitoAnnotations.initMocks(this); } @Test public void shouldDoStuffWithListValues() { //... verify(service).doStuff(captor.capture())); }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)