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