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