StudyPlanCycleConverter extends AbstractConverter<StudyPlanCycle, StudyPlanCycleResource> { @Override public StudyPlanCycleResource convert(final StudyPlanCycle source, final StudyPlanCycleResource target) { target.setId(source.getId()); target.setAbbrName(source.getAbbrName()); target.setName(source.getName()); return target; }  @Override StudyPlanCycleResource convert(final StudyPlanCycle source, final StudyPlanCycleResource target); @Override StudyPlanCycleResource convert(final StudyPlanCycle source);  }
@Test public void testConvert() throws Exception { Long id = 1L; String name = "name"; String abbrName = "abbrName"; StudyPlanCycle source = new StudyPlanCycle(); source.setAbbrName(abbrName); source.setName(name); source.setId(id); StudyPlanCycleResource expected = new StudyPlanCycleResource(); expected.setAbbrName(abbrName); expected.setName(name); expected.setId(id); StudyPlanCycleResource actual = unit.convert(source); assertEquals(expected, actual); }