AssetTypeConverter extends AbstractConverter<AssetType, AssetTypeResource> { @Override public AssetTypeResource convert(final AssetType source, final AssetTypeResource target) { target.setAbbrName(source.getAbbrName()); target.setName(source.getName()); target.setId(source.getId()); return target; }  @Override AssetTypeResource convert(final AssetType source, final AssetTypeResource target); @Override AssetTypeResource convert(final AssetType source);  }
@Test public void testConvert() throws Exception { Long id = 1L; String name = "name"; String abbrName = "abbrname"; AssetType source = new AssetType(); source.setAbbrName(abbrName); source.setName(name); source.setId(id); AssetTypeResource expected = new AssetTypeResource(); expected.setAbbrName(abbrName); expected.setId(id); expected.setName(name); AssetTypeResource actual = unit.convert(source); assertEquals(expected, actual); }