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