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