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