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