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