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