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