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