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