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