SalaryTypeConverter extends AbstractConverter<SalaryType, SalaryTypeResource> { @Override public SalaryTypeResource convert(final SalaryType source, final SalaryTypeResource target) { target.setId(source.getId()); target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override SalaryTypeResource convert(final SalaryType source, final SalaryTypeResource target); @Override SalaryTypeResource convert(final SalaryType source);  }
@Test public void testConvert() throws Exception { String name = "first blood"; String abbrName = "fb"; SalaryType source = new SalaryType(); source.setName(name); source.setAbbrName(abbrName); SalaryTypeResource expected = new SalaryTypeResource(); expected.setName(name); expected.setAbbrName(abbrName); SalaryTypeResource actual = unit.convert(source); assertEquals(expected, actual); }