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