ErrorSummaryMapper implements Function<ErrorInfoInstance, ErrorSummary> { @Override public ErrorSummary apply(final ErrorInfoInstance error) { if (error == null) { return null; } return new ErrorSummary(error.getId(), error.getErrorDate(), error.getMessage(), error.getStacktrace(), error.getRequestInfoId()); }  @Override ErrorSummary apply(final ErrorInfoInstance error);  }
@Test public void testErrorSummaryMapper() { final ErrorInfoInstance error = newErrorInfoInstance(); final ErrorSummary es = new ErrorSummaryMapper().apply(error); assertErrorSummary(error, es); }
@Test public void testErrorSummaryMapperNull() { assertNull(new ErrorSummaryMapper().apply(null)); }