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