Replace copyTo methods with copy constructors
[policy/models.git] / models-dao / src / test / java / org / onap / policy / models / dao / DummyReferenceEntity.java
index aad2aa5..41ead40 100644 (file)
@@ -61,6 +61,11 @@ public class DummyReferenceEntity extends PfConcept {
         this.doubleValue = 123.45;
     }
 
+    public DummyReferenceEntity(DummyReferenceEntity source) {
+        this.key = source.key;
+        this.doubleValue = source.doubleValue;
+    }
+
     /**
      * Constructor.
      *
@@ -89,20 +94,6 @@ public class DummyReferenceEntity extends PfConcept {
         key.clean();
     }
 
-    @Override
-    public PfConcept copyTo(final PfConcept target) {
-        Assertions.argumentNotNull(target, "target may not be null");
-
-        final PfConcept copyObject = target;
-        Assertions.instanceOf(copyObject, DummyReferenceEntity.class);
-
-        final DummyReferenceEntity copy = ((DummyReferenceEntity) copyObject);
-        copy.setKey(key);
-        copy.setDoubleValue(doubleValue);
-
-        return copyObject;
-    }
-
 
     @Override
     public int compareTo(final PfConcept otherObj) {