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