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