RequestSummaryMapper implements Function<RequestInfoInstance, RequestSummary> { @Override public RequestSummary apply(final RequestInfoInstance request) { if (request == null) { return null; } return new RequestSummary(request.getId(), request.getScheduledDate(), request.getStatus() == null ? null : RequestStatus.valueOf(request.getStatus()), request.getCommandName(), request.getMessage(), request.getBusinessKey(), request.getRetries(), request.getExecutions(), null, null, null, request.getContainerId()); }  @Override RequestSummary apply(final RequestInfoInstance request);  }
@Test public void testRequestSummaryMapper() { final RequestInfoInstance request = newRequestInfoInstance(); final RequestSummary rs = new RequestSummaryMapper().apply(request); assertRequestSummary(request, rs); }
@Test public void testRequestSummaryMapperNull() { assertNull(new RequestSummaryMapper().apply(null)); }