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