MarkScaleTypeResourceConverter extends AbstractConverter<MarkScaleTypeResource, MarkScaleType> { @Override public MarkScaleType convert(final MarkScaleTypeResource source, final MarkScaleType target) { target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override MarkScaleType convert(final MarkScaleTypeResource source, final MarkScaleType target); @Override MarkScaleType convert(final MarkScaleTypeResource source);  }
@Test public void testConvert() throws Exception { String name = "MarkScaleN"; String abbrName = "AN"; MarkScaleType expected = new MarkScaleType(); expected.setName(name); expected.setAbbrName(abbrName); MarkScaleTypeResource source = new MarkScaleTypeResource(); source.setName(name); source.setAbbrName(abbrName); MarkScaleType actual = unit.convert(source); assertEquals(expected, actual); }