aboutsummaryrefslogtreecommitdiffstats
path: root/context/context-test-utils
diff options
context:
space:
mode:
Diffstat (limited to 'context/context-test-utils')
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java3
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java
index 2653ca271..c40eeba98 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java
@@ -241,6 +241,9 @@ public class ArtifactKeyTestEntity extends AxConcept {
if (this == otherObj) {
return 0;
}
+ if (getClass() != otherObj.getClass()) {
+ return -1;
+ }
final ArtifactKeyTestEntity other = (ArtifactKeyTestEntity) otherObj;
if (key == null) {
if (other.key != null) {
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java
index d172f0276..3c421a7a9 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java
@@ -244,6 +244,9 @@ public class ReferenceKeyTestEntity extends AxConcept {
if (this == otherObj) {
return 0;
}
+ if (getClass() != otherObj.getClass()) {
+ return -1;
+ }
final ReferenceKeyTestEntity other = (ReferenceKeyTestEntity) otherObj;
if (key == null) {
if (other.key != null) {