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