summaryrefslogtreecommitdiffstats
path: root/models-pdp/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'models-pdp/src/test/java')
-rw-r--r--models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroupTest.java6
-rw-r--r--models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroupTest.java6
-rw-r--r--models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpTest.java6
3 files changed, 9 insertions, 9 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroupTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroupTest.java
index a2f502bcc..b40c91982 100644
--- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroupTest.java
+++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpGroupTest.java
@@ -119,9 +119,7 @@ public class JpaPdpGroupTest {
testJpaPdpGroup.setKey(new PfConceptKey(PDP_GROUP0, VERSION));
testJpaPdpGroup.fromAuthorative(testPdpGroup);
- assertThatThrownBy(() -> {
- testJpaPdpGroup.copyTo(null);
- }).hasMessage("target is marked @NonNull but is null");
+ assertThatThrownBy(() -> new JpaPdpGroup((JpaPdpGroup) null)).isInstanceOf(NullPointerException.class);
assertEquals(PDP_GROUP0, testJpaPdpGroup.getKey().getName());
assertEquals(PDP_GROUP0, new JpaPdpGroup(testPdpGroup).getKey().getName());
@@ -230,5 +228,7 @@ public class JpaPdpGroupTest {
assertEquals(2, testJpaPdpGroup.getKeys().size());
testJpaPdpGroup.clean();
assertEquals(2, testJpaPdpGroup.getKeys().size());
+
+ assertEquals(testJpaPdpGroup, new JpaPdpGroup(testJpaPdpGroup));
}
}
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroupTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroupTest.java
index 981f40f06..ad0164ad4 100644
--- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroupTest.java
+++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpSubGroupTest.java
@@ -127,9 +127,7 @@ public class JpaPdpSubGroupTest {
testJpaPdpSubGroup.fromAuthorative(null);
}).hasMessage("pdpSubgroup is marked @NonNull but is null");
- assertThatThrownBy(() -> {
- testJpaPdpSubGroup.copyTo(null);
- }).hasMessage("target is marked @NonNull but is null");
+ assertThatThrownBy(() -> new JpaPdpSubGroup((JpaPdpSubGroup) null)).isInstanceOf(NullPointerException.class);
assertEquals(PDP_A, testJpaPdpSubGroup.getKey().getLocalName());
assertEquals(PDP_A, new JpaPdpSubGroup(testPdpSubgroup).getKey().getLocalName());
@@ -279,5 +277,7 @@ public class JpaPdpSubGroupTest {
assertEquals("Prop Value", testJpaPdpSubGroup.getProperties().get("PropKey"));
assertEquals(4, testJpaPdpSubGroup.getKeys().size());
+
+ assertEquals(testJpaPdpSubGroup, new JpaPdpSubGroup(testJpaPdpSubGroup));
}
}
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpTest.java
index 5ffba10b9..b6d5161f8 100644
--- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpTest.java
+++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpTest.java
@@ -99,9 +99,7 @@ public class JpaPdpTest {
testJpaPdp.fromAuthorative(null);
}).hasMessage("pdp is marked @NonNull but is null");
- assertThatThrownBy(() -> {
- testJpaPdp.copyTo(null);
- }).hasMessage("target is marked @NonNull but is null");
+ assertThatThrownBy(() -> new JpaPdp((JpaPdp) null)).isInstanceOf(NullPointerException.class);
assertEquals(PDP1, testJpaPdp.getKey().getLocalName());
assertEquals(PDP1, new JpaPdp(testPdp).getKey().getLocalName());
@@ -184,5 +182,7 @@ public class JpaPdpTest {
assertEquals(-13, testJpaPdp.compareTo(otherJpaPdp));
testJpaPdp.setMessage("Valid Message");
assertEquals(0, testJpaPdp.compareTo(otherJpaPdp));
+
+ assertEquals(testJpaPdp, new JpaPdp(testJpaPdp));
}
}