ExecutionErrorListPresenter extends AbstractMultiGridPresenter<ExecutionErrorSummary, ExecutionErrorListPresenter.ExecutionErrorListView> { protected ExecutionErrorSummary createExecutionErrorSummaryFromDataSet(final DataSet dataSet, final Integer index) { return new ExecutionErrorSummary( getColumnStringValue(dataSet, COLUMN_ERROR_ID, index), getColumnStringValue(dataSet, COLUMN_ERROR_TYPE, index), getColumnStringValue(dataSet, COLUMN_DEPLOYMENT_ID, index), getColumnLongValue(dataSet, COLUMN_PROCESS_INST_ID, index), getColumnStringValue(dataSet, COLUMN_PROCESS_ID, index), getColumnLongValue(dataSet, COLUMN_ACTIVITY_ID, index), getColumnStringValue(dataSet, COLUMN_ACTIVITY_NAME, index), getColumnLongValue(dataSet, COLUMN_JOB_ID, index), getColumnStringValue(dataSet, COLUMN_ERROR_MSG, index), getColumnIntValue(dataSet, COLUMN_ERROR_ACK, index).shortValue(), getColumnStringValue(dataSet, COLUMN_ERROR_ACK_BY, index), getColumnDateValue(dataSet, COLUMN_ERROR_ACK_AT, index), getColumnDateValue(dataSet, COLUMN_ERROR_DATE, index) ); }  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 testGetExecutionErrorSummary() { final String errorId = "errorId"; final String errorType = "Process"; final String deploymentId = "deploymentId"; final Long processInsId = 1L; final String processId = "processId"; final Long activityId = 1L; final String activityName = "activityName"; final Long jobId = 1L; final String errorMessage = "errorMessage"; final Short ack = 0; final String ackBy = "ackBy"; final Date ackAt = new Date(); final Date errorDate = new Date(); final DataSet dataSet = mock(DataSet.class); when(dataSet.getValueAt(0, COLUMN_ERROR_ID)).thenReturn(errorId); when(dataSet.getValueAt(0, COLUMN_ERROR_TYPE)).thenReturn(errorType); when(dataSet.getValueAt(0, COLUMN_DEPLOYMENT_ID)).thenReturn(deploymentId); when(dataSet.getValueAt(0, COLUMN_PROCESS_INST_ID)).thenReturn(processInsId); when(dataSet.getValueAt(0, COLUMN_PROCESS_ID)).thenReturn(processId); when(dataSet.getValueAt(0, COLUMN_ACTIVITY_ID)).thenReturn(activityId); when(dataSet.getValueAt(0, COLUMN_ACTIVITY_NAME)).thenReturn(activityName); when(dataSet.getValueAt(0, COLUMN_JOB_ID)).thenReturn(jobId); when(dataSet.getValueAt(0, COLUMN_ERROR_MSG)).thenReturn(errorMessage); when(dataSet.getValueAt(0, COLUMN_ERROR_ACK)).thenReturn(ack); when(dataSet.getValueAt(0, COLUMN_ERROR_ACK_BY)).thenReturn(ackBy); when(dataSet.getValueAt(0, COLUMN_ERROR_ACK_AT)).thenReturn(ackAt); when(dataSet.getValueAt(0, COLUMN_ERROR_DATE)).thenReturn(errorDate); final ExecutionErrorSummary es = presenter.createExecutionErrorSummaryFromDataSet(dataSet, 0); assertEquals(errorMessage, es.getErrorMessage()); assertEquals(errorType, es.getType().getType()); assertEquals(errorMessage, es.getErrorMessage()); assertEquals(ackAt, es.getAcknowledgedAt()); assertEquals(ackBy, es.getAcknowledgedBy()); assertEquals(Boolean.valueOf(ack != 0), es.isAcknowledged()); assertEquals(activityId, es.getActivityId()); assertEquals(activityName, es.getActivityName()); assertEquals(deploymentId, es.getDeploymentId()); assertEquals(errorId, es.getErrorId()); assertEquals(processId, es.getProcessId()); assertEquals(processInsId, es.getProcessInstanceId()); assertEquals(jobId, es.getJobId()); }