CaseInstanceListPresenter extends AbstractPresenter<CaseInstanceListPresenter.CaseInstanceListView> { protected void refreshData() { caseService.call((List<CaseInstanceSummary> cases) -> view.setCaseInstanceList(cases)).getCaseInstances(view.getValue()); }  @WorkbenchPartTitle String getTitle(); @Override void init(); void createCaseInstance(); void onCaseCreatedEvent(@Observes CaseCreatedEvent event); @Inject void setCaseService(final Caller<CaseManagementService> caseService); static final String SCREEN_ID; }
@Test public void testRefreshData() { presenter.refreshData(); verify(caseManagementService).getCaseInstances(view.getValue()); final ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); verify(view).setCaseInstanceList(captor.capture()); assertEquals(caseInstanceSummaryList.size(), captor.getValue().size()); }