ProcessDefinitionListPresenter extends AbstractMultiGridPresenter<ProcessSummary, ProcessDefinitionListPresenter.ProcessDefinitionListView> { public void viewProcessInstances(String processDefId) { PlaceRequest placeRequestImpl = new DefaultPlaceRequest(PROCESS_INSTANCES); placeRequestImpl.addParameter(SEARCH_PARAMETER_PROCESS_DEFINITION_ID, processDefId); placeManager.goTo(placeRequestImpl); } ProcessDefinitionListPresenter(); @Inject void setAuthorizationManager(final AuthorizationManager authorizationManager); @Inject void setProcessDefinitionListBasicFiltersPresenter(final ProcessDefinitionListBasicFiltersPresenter processDefinitionListBasicFiltersPresenter); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override void createListBreadcrumb(); void setupDetailBreadcrumb(String detailLabel); void openGenericForm(final String processDefId,
                                final String deploymentId,
                                final String processDefName,
                                final boolean isDynamic); @Inject void setFilterSettingsManager(final ProcessDefinitionListFilterSettingsManager filterSettingsManager); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); void refreshNewProcessInstance(@Observes NewProcessInstanceEvent newProcessInstance); void refreshNewCaseInstance(@Observes NewCaseInstanceEvent newCaseInstance); Predicate<ProcessSummary> getViewProcessInstanceActionCondition(); Predicate<ProcessSummary> getStartCondition(); void viewProcessInstances(String processDefId); boolean isUserAuthorizedForPerspective(final String perspectiveId); @Inject void setProcessRuntimeDataService(final Caller<ProcessRuntimeDataService> processRuntimeDataService);  }
@Test public void testViewProcessInstances() { String processDefinition = "procDef"; when(authorizationManager.authorize(any(ResourceRef.class), eq(identity))).thenReturn(true); presenter.viewProcessInstances(processDefinition); final ArgumentCaptor<PlaceRequest> captor = ArgumentCaptor.forClass(PlaceRequest.class); verify(placeManager).goTo(captor.capture()); assertEquals(1, captor.getAllValues().size()); assertEquals(PROCESS_INSTANCES, captor.getValue().getIdentifier()); assertEquals(1, captor.getValue().getParameters().size()); assertEquals(processDefinition, captor.getValue().getParameters().get(SEARCH_PARAMETER_PROCESS_DEFINITION_ID)); }