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