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