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