LanguageResourceConverter extends AbstractConverter<LanguageResource, Language> { @Override public Language convert(final LanguageResource source, final Language target) { target.setAbbrName(source.getAbbrName()); target.setName(source.getName()); return target; }  @Override Language convert(final LanguageResource source, final Language target); @Override Language convert(final LanguageResource source);  }
@Test public void testConvert() throws Exception { String name = "name"; String abbrName = "abbr name"; Language expected = new Language(); expected.setAbbrName(abbrName); expected.setName(name); LanguageResource source = new LanguageResource(); source.setAbbrName(abbrName); source.setName(name); Language actual = unit.convert(source); assertEquals(expected, actual); }