StreetTypeResourceConverter extends AbstractConverter<StreetTypeResource, StreetType> { @Override public StreetType convert(final StreetTypeResource source, final StreetType target) { target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override StreetType convert(final StreetTypeResource source, final StreetType target); @Override StreetType convert(final StreetTypeResource source);  }
@Test public void testConvert() throws Exception { String name = "first blood"; String abbrName = "fb"; StreetType expected = new StreetType(); expected.setName(name); expected.setAbbrName(abbrName); StreetTypeResource source = new StreetTypeResource(); source.setName(name); source.setAbbrName(abbrName); StreetType actual = unit.convert(source); assertEquals(expected, actual); }