ExecutionErrorListPresenter extends AbstractMultiGridPresenter<ExecutionErrorSummary, ExecutionErrorListPresenter.ExecutionErrorListView> { @Override public boolean existActiveSearchFilters() { final Optional<String> processInstanceSearch = getSearchParameter(PerspectiveIds.SEARCH_PARAMETER_PROCESS_INSTANCE_ID); if (processInstanceSearch.isPresent()) { return true; } final Optional<String> taskIdSearch = getSearchParameter(PerspectiveIds.SEARCH_PARAMETER_TASK_ID); if (taskIdSearch.isPresent()) { return true; } final Optional<String> errorTypeSearch = getSearchParameter(PerspectiveIds.SEARCH_PARAMETER_ERROR_TYPE); if (errorTypeSearch.isPresent()) { return true; } final Optional<String> isErrorAckSearch = getSearchParameter(PerspectiveIds.SEARCH_PARAMETER_IS_ERROR_ACK); if (isErrorAckSearch.isPresent()) { return true; } return false; }  void createListBreadcrumb(); void setupDetailBreadcrumb(String detailLabel); void acknowledgeExecutionError(final String executionErrorId,
                                          final String deploymentId); void goToJob(ExecutionErrorSummary errorSummary); Predicate<ExecutionErrorSummary> getAcknowledgeActionCondition(); Predicate<ExecutionErrorSummary> getViewJobActionCondition(); Predicate<ExecutionErrorSummary> getViewProcessInstanceActionCondition(); Predicate<ExecutionErrorSummary> getViewTaskActionCondition(); void goToProcessInstance(final ExecutionErrorSummary errorSummary); void goToTask(final ExecutionErrorSummary errorSummary); void bulkAcknowledge(List<ExecutionErrorSummary> execErrorsSelected); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override void selectSummaryItem(final ExecutionErrorSummary summary); @Inject void setFilterSettingsManager(final ExecutionErrorListFilterSettingsManager filterSettingsManager); @Inject void setExecutorService(final Caller<ExecutorService> executorService); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter); String getStatusColumnFilterDescription(ColumnFilter columnFilter); String getTypeColumnFilterDescription(ColumnFilter columnFilter); void setExecutionErrorSelectedEvent(Event<ExecutionErrorSelectedEvent> executionErrorSelectedEvent);  }
@Test public void testExistActiveSearchFilters() { final PlaceRequest place = mock(PlaceRequest.class); presenter.onStartup(place); when(place.getParameter(SEARCH_PARAMETER_PROCESS_INSTANCE_ID, null)).thenReturn("1"); assertTrue(presenter.existActiveSearchFilters()); when(place.getParameter(SEARCH_PARAMETER_TASK_ID, null)).thenReturn("1"); assertTrue(presenter.existActiveSearchFilters()); when(place.getParameter(SEARCH_PARAMETER_ERROR_TYPE, null)).thenReturn(Constants.INSTANCE.DB()); assertTrue(presenter.existActiveSearchFilters()); when(place.getParameter(SEARCH_PARAMETER_IS_ERROR_ACK, null)).thenReturn("0"); assertTrue(presenter.existActiveSearchFilters()); when(place.getParameter(SEARCH_PARAMETER_PROCESS_INSTANCE_ID, null)).thenReturn(null); when(place.getParameter(SEARCH_PARAMETER_TASK_ID, null)).thenReturn(null); when(place.getParameter(SEARCH_PARAMETER_ERROR_TYPE, null)).thenReturn(null); when(place.getParameter(SEARCH_PARAMETER_IS_ERROR_ACK, null)).thenReturn(null); assertFalse(presenter.existActiveSearchFilters()); }