@Test public void convert_shouldConvertString() { Assert.assertNull(converter.convert(null)); Assert.assertNull(converter.convert("")); Assert.assertThat(converter.convert("1"), is(Context.getService(ReportService.class).getReportRequest(1))); }
@Override public ReportRequest convert(String source) { if (StringUtils.isEmpty(source)) { return null; } return Context.getService(ReportService.class).getReportRequest(Integer.valueOf(source)); }
StringToReportRequestConverter implements Converter<String, ReportRequest> { @Override public ReportRequest convert(String source) { if (StringUtils.isEmpty(source)) { return null; } return Context.getService(ReportService.class).getReportRequest(Integer.valueOf(source)); } }
StringToReportRequestConverter implements Converter<String, ReportRequest> { @Override public ReportRequest convert(String source) { if (StringUtils.isEmpty(source)) { return null; } return Context.getService(ReportService.class).getReportRequest(Integer.valueOf(source)); }  }
StringToReportRequestConverter implements Converter<String, ReportRequest> { @Override public ReportRequest convert(String source) { if (StringUtils.isEmpty(source)) { return null; } return Context.getService(ReportService.class).getReportRequest(Integer.valueOf(source)); }  @Override ReportRequest convert(String source); }
StringToReportRequestConverter implements Converter<String, ReportRequest> { @Override public ReportRequest convert(String source) { if (StringUtils.isEmpty(source)) { return null; } return Context.getService(ReportService.class).getReportRequest(Integer.valueOf(source)); }  @Override ReportRequest convert(String source);  }