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