EnrolmentStatusTypeConverter extends AbstractConverter<EnrolmentStatusType, EnrolmentStatusTypeResource> { @Override public EnrolmentStatusTypeResource convert(final EnrolmentStatusType source, final EnrolmentStatusTypeResource target) { target.setId(source.getId()); target.setAbbrName(source.getAbbrName()); target.setName(source.getName()); target.setDescription(source.getDescription()); return target; }  @Override EnrolmentStatusTypeResource convert(final EnrolmentStatusType source, final EnrolmentStatusTypeResource target); @Override EnrolmentStatusTypeResource convert(final EnrolmentStatusType source);  }
@Test public void testConvert() throws Exception { String name = "first blood"; String abbrName = "fb"; String description = "first death"; EnrolmentStatusType source = new EnrolmentStatusType(); source.setName(name); source.setAbbrName(abbrName); source.setDescription(description); EnrolmentStatusTypeResource expected = new EnrolmentStatusTypeResource(); expected.setName(name); expected.setAbbrName(abbrName); expected.setDescription(description); EnrolmentStatusTypeResource actual = unit.convert(source); assertEquals(expected, actual); }