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