DutyTypeResourceConverter extends AbstractConverter<DutyTypeResource, DutyType> { @Override public DutyType convert(final DutyTypeResource source, final DutyType target) { target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override DutyType convert(final DutyTypeResource source, final DutyType target); @Override DutyType convert(final DutyTypeResource source);  }
@Test public void testConvert() throws Exception { String name = "DutyN"; String abbrName = "AN"; DutyType expected = new DutyType(); expected.setName(name); expected.setAbbrName(abbrName); DutyTypeResource source = new DutyTypeResource(); source.setName(name); source.setAbbrName(abbrName); DutyType actual = unit.convert(source); assertEquals(expected, actual); }