TimeSheetTypeResourceConverter extends AbstractConverter<TimeSheetTypeResource, TimeSheetType> { @Override public TimeSheetType convert(final TimeSheetTypeResource source, final TimeSheetType target) { target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override TimeSheetType convert(final TimeSheetTypeResource source, final TimeSheetType target); @Override TimeSheetType convert(final TimeSheetTypeResource source);  }
@Test public void testConvert() throws Exception { String name = "Test string"; String abbrName = "ts"; TimeSheetType expected = new TimeSheetType(); expected.setName(name); expected.setAbbrName(abbrName); TimeSheetTypeResource source = new TimeSheetTypeResource(); source.setName(name); source.setAbbrName(abbrName); TimeSheetType actual = unit.convert(source); assertEquals(expected, actual); }