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