CaseInstanceListPresenter extends AbstractPresenter<CaseInstanceListPresenter.CaseInstanceListView> { protected void selectCaseInstance(final CaseInstanceSummary cis) { final Map<String, String> parameters = new HashMap<>(); parameters.put(CaseOverviewPresenter.PARAMETER_CONTAINER_ID, cis.getContainerId()); parameters.put(CaseOverviewPresenter.PARAMETER_CASE_ID, cis.getCaseId()); final DefaultPlaceRequest overview = new DefaultPlaceRequest(CaseOverviewPerspective.PERSPECTIVE_ID, parameters); placeManager.goTo(overview); }  @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 testSelectCaseInstance() { final CaseInstanceSummary cis = createCaseInstance(); presenter.selectCaseInstance(cis); final ArgumentCaptor<DefaultPlaceRequest> captor = ArgumentCaptor.forClass(DefaultPlaceRequest.class); verify(placeManager).goTo(captor.capture()); final DefaultPlaceRequest dpr = captor.getValue(); assertNotNull(dpr); assertEquals(cis.getContainerId(), dpr.getParameter(CaseOverviewPresenter.PARAMETER_CONTAINER_ID, null)); assertEquals(cis.getCaseId(), dpr.getParameter(CaseOverviewPresenter.PARAMETER_CASE_ID, null)); }