ExecutionErrorListPresenter extends AbstractMultiGridPresenter<ExecutionErrorSummary, ExecutionErrorListPresenter.ExecutionErrorListView> { public void bulkAcknowledge(List<ExecutionErrorSummary> execErrorsSelected) { if (execErrorsSelected == null || execErrorsSelected.isEmpty()) { return; } for (ExecutionErrorSummary selected : execErrorsSelected) { if (selected.isAcknowledged()) { view.displayNotification("Error " + selected.getErrorId() + "is already acknowledge"); continue; } else { acknowledgeExecutionError(selected.getErrorId(), selected.getDeploymentId()); } } deselectAllItems(); }  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 bulkAcknowledgeTest() { String error1_ID = "error1"; String error2_ID = "error2"; String error3_ID = "error3"; String error1_deploymentId = "deploymentId_1"; String error2_deploymentId = "deploymentId_2"; String error3_deploymentId = "deploymentId_3"; final ArrayList<ExecutionErrorSummary> testErrors = new ArrayList<>( Arrays.asList( ExecutionErrorSummary.builder().errorId(error1_ID).deploymentId(error1_deploymentId).acknowledged(false).build(), ExecutionErrorSummary.builder().errorId(error2_ID).deploymentId(error2_deploymentId).acknowledged(false).build(), ExecutionErrorSummary.builder().errorId(error3_ID).deploymentId(error3_deploymentId).acknowledged(true).build() )); presenter.bulkAcknowledge(testErrors); verify(executorServiceMock).acknowledgeError(anyString(), eq(error1_deploymentId), eq(error1_ID)); verify(executorServiceMock).acknowledgeError(anyString(), eq(error2_deploymentId), eq(error2_ID)); verifyNoMoreInteractions(executorServiceMock); verify(extendedPagedTable).deselectAllItems(); }