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