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