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