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