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