summaryrefslogtreecommitdiffstats
path: root/feature-session-persistence
diff options
context:
space:
mode:
Diffstat (limited to 'feature-session-persistence')
-rw-r--r--feature-session-persistence/pom.xml9
-rw-r--r--feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java31
2 files changed, 21 insertions, 19 deletions
diff --git a/feature-session-persistence/pom.xml b/feature-session-persistence/pom.xml
index c81e7b13..afa9e601 100644
--- a/feature-session-persistence/pom.xml
+++ b/feature-session-persistence/pom.xml
@@ -3,13 +3,14 @@
ONAP Policy Engine - Drools PDP
================================================================================
Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2020 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -139,12 +140,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
- <version>2.1.1</version>
+ <version>2.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
- <version>2.4.2</version>
+ <version>2.8.0</version>
</dependency>
<dependency>
diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
index 8853edf2..3033a7bd 100644
--- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
+++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
@@ -22,6 +22,7 @@ package org.onap.policy.drools.persistence;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import java.util.Date;
@@ -36,11 +37,11 @@ public class DroolsSessionEntityTest {
DroolsSessionEntity e2 = makeEnt("mynameA", 2);
// session id is not part of hash code
- assertTrue(entity.hashCode() == e2.hashCode());
+ assertEquals(entity.hashCode(), e2.hashCode());
// diff sess name
e2 = makeEnt("mynameB", 1);
- assertTrue(entity.hashCode() != e2.hashCode());
+ assertNotEquals(entity.hashCode(), e2.hashCode());
}
/** Ensures that hashCode() functions as expected when the getXxx methods are overridden. */
@@ -51,11 +52,11 @@ public class DroolsSessionEntityTest {
DroolsSessionEntity e2 = makeEnt("mynameA", 2);
// session id is not part of hash code
- assertTrue(entity.hashCode() == e2.hashCode());
+ assertEquals(entity.hashCode(), e2.hashCode());
// diff sess name
e2 = makeEnt("mynameB", 1);
- assertTrue(entity.hashCode() != e2.hashCode());
+ assertNotEquals(entity.hashCode(), e2.hashCode());
}
@Test
@@ -103,21 +104,21 @@ public class DroolsSessionEntityTest {
DroolsSessionEntity entity = makeEnt("mynameA", 1);
// diff object type
- assertFalse(entity.equals("hello"));
+ assertNotEquals(entity, "hello");
// reflexive
- assertTrue(entity.equals(entity));
+ assertEquals(entity, entity);
DroolsSessionEntity e2 = makeEnt("mynameA", 2);
// session id is not part of hash code
- assertTrue(entity.equals(e2));
- assertTrue(entity.equals(e2));
+ assertEquals(entity, e2);
+ assertEquals(entity, e2);
// diff sess name
e2 = makeEnt("mynameB", 1);
- assertFalse(entity.equals(e2));
- assertFalse(entity.equals(e2));
+ assertNotEquals(entity, e2);
+ assertNotEquals(entity, e2);
}
/** Ensures that equals() functions as expected when the getXxx methods are overridden. */
@@ -126,18 +127,18 @@ public class DroolsSessionEntityTest {
DroolsSessionEntity entity = makeEnt2("mynameA", 1);
// reflexive
- assertTrue(entity.equals(entity));
+ assertEquals(entity, entity);
DroolsSessionEntity e2 = makeEnt("mynameA", 2);
// session id is not part of hash code
- assertTrue(entity.equals(e2));
- assertTrue(entity.equals(e2));
+ assertEquals(entity, e2);
+ assertEquals(entity, e2);
// diff sess name
e2 = makeEnt("mynameB", 1);
- assertFalse(entity.equals(e2));
- assertFalse(entity.equals(e2));
+ assertNotEquals(entity, e2);
+ assertNotEquals(entity, e2);
}
@Test