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