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