ExecutionErrorSummaryMapper implements Function<ExecutionErrorInstance, ExecutionErrorSummary> { @Override public ExecutionErrorSummary apply(final ExecutionErrorInstance executionErrorInstance) { if (executionErrorInstance == null) { return null; } return ExecutionErrorSummary.builder() .errorId(executionErrorInstance.getErrorId()) .error(executionErrorInstance.getError()) .acknowledged(executionErrorInstance.isAcknowledged()) .acknowledgedAt(executionErrorInstance.getAcknowledgedAt()) .acknowledgedBy(executionErrorInstance.getAcknowledgedBy()) .activityId(executionErrorInstance.getActivityId()) .activityName(executionErrorInstance.getActivityName()) .errorDate(executionErrorInstance.getErrorDate()) .type(ExecutionErrorType.fromType(executionErrorInstance.getType())) .deploymentId(executionErrorInstance.getContainerId()) .processInstanceId(executionErrorInstance.getProcessInstanceId()) .processId(executionErrorInstance.getProcessId()) .jobId(executionErrorInstance.getJobId()) .message(executionErrorInstance.getErrorMessage()) .build(); }  @Override ExecutionErrorSummary apply(final ExecutionErrorInstance executionErrorInstance);  }
@Test public void testErrorSummaryMapper() { final ExecutionErrorInstance error = createTestError("1"); final ExecutionErrorSummary ees = new ExecutionErrorSummaryMapper().apply(error); assertExecutionErrorSummary(error, ees); }
@Test public void testErrorSummaryMapperNull() { assertNull(new ErrorSummaryMapper().apply(null)); }