ProcessInstanceListPresenter extends AbstractMultiGridPresenter<ProcessInstanceSummary, ProcessInstanceListPresenter.ProcessInstanceListView> { @Override protected void removeActiveFilter(final ColumnFilter columnFilter) { if (isFilteredByProcessId(columnFilter) != null) { view.removeDomainSpecifColumns(); } super.removeActiveFilter(columnFilter); }  @Inject void setProcessInstanceSelectedEvent(final Event<ProcessInstanceSelectionEvent> processInstanceSelectionEvent); @Override void createListBreadcrumb(); void setupDetailBreadcrumb(String detailLabel); void getDomainSpecifDataForProcessInstances(final Integer startRange,
                                                       final List<ProcessInstanceSummary> instancesFromDataSet,
                                                       final Boolean lastPage); void newInstanceCreated(@Observes final NewProcessInstanceEvent pi); void newInstanceCreated(@Observes final ProcessInstancesUpdateEvent pis); void abortProcessInstance(String containerId,
                                     long processInstanceId); void abortProcessInstances(Map<String, List<Long>> containerInstances); void bulkSignal(List<ProcessInstanceSummary> processInstances); void bulkAbort(List<ProcessInstanceSummary> processInstances); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); void signalProcessInstance(final ProcessInstanceSummary processInstance); @Override void selectSummaryItem(final ProcessInstanceSummary summary); void refreshDetailBreadcrumb(@Observes ProcessInstanceSelectionEvent event); void formClosed(@Observes BeforeClosePlaceEvent closed); @Inject void setFilterSettingsManager(final ProcessInstanceListFilterSettingsManager filterSettingsManager); @Inject void setProcessService(final Caller<ProcessService> processService); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter); String getStatusColumnFilterDescription(ColumnFilter columnFilter); void openJobsView(final String pid); void openTaskView(final String pid); @Override void openErrorView(final String pid); Predicate<ProcessInstanceSummary> getSignalActionCondition(); Predicate<ProcessInstanceSummary> getAbortActionCondition(); Predicate<ProcessInstanceSummary> getViewJobsActionCondition(); Predicate<ProcessInstanceSummary> getViewTasksActionCondition(); @Override Predicate<ProcessInstanceSummary> getViewErrorsActionCondition();  }
@Test public void testRemoveActiveFilter() { final String processId = "testProc"; presenter.removeActiveFilter(equalsTo(COLUMN_PROCESS_ID, processId)); verify(viewMock).removeDomainSpecifColumns(); reset(viewMock); presenter.removeActiveFilter(in(COLUMN_PROCESS_ID, Arrays.asList(processId))); verify(viewMock, never()).removeDomainSpecifColumns(); }
@Test public void testOnBasicFilterRemoveEvent() { final ActiveFilterItem<Object> filter = new ActiveFilterItem<>("key1", null, null, null, null); final ColumnFilter columnFilter = mock(ColumnFilter.class); presenter.onBasicFilterRemoveEvent(new BasicFilterRemoveEvent("ProcessInstanceLogDataset", filter, columnFilter)); verify(viewMock, never()).removeActiveFilter(filter); verify(filterSettings, never()).removeColumnFilter(columnFilter); presenter.onBasicFilterRemoveEvent(new BasicFilterRemoveEvent(datasetUId, filter, columnFilter)); verify(viewMock).removeActiveFilter(filter); verify(filterSettings).removeColumnFilter(columnFilter); }