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