OperationTypeConverter extends AbstractConverter<OperationType, OperationTypeResource> { @Override public OperationTypeResource convert(final OperationType source, final OperationTypeResource target) { target.setId(source.getId()); target.setName(source.getName()); target.setAbbrName(source.getAbbrName()); return target; }  @Override OperationTypeResource convert(final OperationType source, final OperationTypeResource target); @Override OperationTypeResource convert(final OperationType source);  }
@Test public void testConvert() throws Exception { String name = "dog"; String abbrName = "d"; OperationType source = new OperationType(); source.setAbbrName(abbrName); source.setName(name); OperationTypeResource expected = new OperationTypeResource(); expected.setAbbrName(abbrName); expected.setName(name); OperationTypeResource actual = unit.convert(source); assertEquals(expected, actual); }