summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-07-02 11:24:51 +0100
committerliamfallon <liam.fallon@est.tech>2021-07-02 11:25:00 +0100
commit08469e2a03bb0ec916b8ca46bc4373d8df970fb0 (patch)
treef378277b5de94dd5298519f1f936857a182d64ae /models
parent72d882f65031518e9d1b1a6d6e53c7d42ab8495f (diff)
Convert clamp-models unit tests to JUnit 5
JUnit 4 tests do not fire when JUnit 5 is activated. Issue-ID: POLICY-3452 Change-Id: I5efb8ee996b06dc7f57107b8f77408adc1a4f22f Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopConceptPojosTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementTest.java8
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java8
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantTest.java8
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java14
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java16
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java16
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantStatisticsTest.java14
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java14
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/PojosTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProviderTest.java20
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java24
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProviderTest.java24
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProviderTest.java20
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopNotificationTest.java8
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopStatusTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/NotificationPojosTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopUpdateTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java12
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantPojosTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/MessagesRestPojosTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/InstantiationCommandTest.java6
28 files changed, 145 insertions, 145 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsTest.java
index 0addc25ad..3bb0050c8 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsTest.java
@@ -28,12 +28,12 @@ import static org.junit.Assert.assertNotNull;
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ClElementStatisticsTest {
+class ClElementStatisticsTest {
@Test
- public void testClElementStatisticsLombok() {
+ void testClElementStatisticsLombok() {
assertNotNull(new ClElementStatistics());
ClElementStatistics cles0 = new ClElementStatistics();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopConceptPojosTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopConceptPojosTest.java
index 908c91417..daade4d52 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopConceptPojosTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopConceptPojosTest.java
@@ -31,16 +31,16 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class ControlLoopConceptPojosTest {
+class ControlLoopConceptPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(ControlLoopConceptPojosTest.class.getPackageName());
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementTest.java
index 2264f6dc2..9e285a4f0 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElementTest.java
@@ -27,12 +27,12 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopElementTest {
+class ControlLoopElementTest {
@Test
- public void testControlLoopElement() {
+ void testControlLoopElement() {
ControlLoopElement cle0 = new ControlLoopElement();
@@ -41,7 +41,7 @@ public class ControlLoopElementTest {
}
@Test
- public void testControlLoopElementLombok() {
+ void testControlLoopElementLombok() {
assertNotNull(new ControlLoopElement());
ControlLoopElement cle0 = new ControlLoopElement();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
index c865b76ab..243d8dcd5 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java
@@ -29,13 +29,13 @@ import static org.junit.Assert.assertNull;
import java.util.LinkedHashMap;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.PfKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopTest {
+class ControlLoopTest {
@Test
- public void testControlLoop() {
+ void testControlLoop() {
ControlLoop cl0 = new ControlLoop();
cl0.setDefinition(new ToscaConceptIdentifier("dfName", "1.2.3"));
assertEquals("dfName", cl0.getType());
@@ -48,7 +48,7 @@ public class ControlLoopTest {
}
@Test
- public void testControlLoopLombok() {
+ void testControlLoopLombok() {
assertNotNull(new ControlLoop());
ControlLoop cl0 = new ControlLoop();
cl0.setElements(new LinkedHashMap<>());
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsTest.java
index 54eaca00e..f55f624bf 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsTest.java
@@ -27,12 +27,12 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatisticsTest {
+class ParticipantStatisticsTest {
@Test
- public void testParticipantStatisticsLombok() {
+ void testParticipantStatisticsLombok() {
assertNotNull(new ParticipantStatistics());
ParticipantStatistics ps0 = new ParticipantStatistics();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantTest.java
index 1eb80db09..5c429b96c 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantTest.java
@@ -26,12 +26,12 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantTest {
+class ParticipantTest {
@Test
- public void testParticipant() {
+ void testParticipant() {
Participant p0 = new Participant();
p0.setDefinition(new ToscaConceptIdentifier("dfName", "1.2.3"));
@@ -45,7 +45,7 @@ public class ParticipantTest {
}
@Test
- public void testParticipantLombok() {
+ void testParticipantLombok() {
assertNotNull(new Participant());
Participant p0 = new Participant();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
index 16c302f94..0e6fb8383 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaClElementStatisticsTest.java
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertTrue;
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
@@ -40,12 +40,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the {@link JpaClElementStatistics} class.
*/
-public class JpaClElementStatisticsTest {
+class JpaClElementStatisticsTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaClElementStatisticsConstructor() {
+ void testJpaClElementStatisticsConstructor() {
assertThatThrownBy(() -> {
new JpaClElementStatistics((JpaClElementStatistics) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
@@ -72,7 +72,7 @@ public class JpaClElementStatisticsTest {
}
@Test
- public void testJpaClElementStatistics() {
+ void testJpaClElementStatistics() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
ClElementStatistics cles = createClElementStatisticsInstance();
@@ -112,7 +112,7 @@ public class JpaClElementStatisticsTest {
}
@Test
- public void testJpaClElementStatisticsValidation() {
+ void testJpaClElementStatisticsValidation() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
assertThatThrownBy(() -> {
@@ -123,7 +123,7 @@ public class JpaClElementStatisticsTest {
}
@Test
- public void testJpaClElementStatisticsCompareTo() {
+ void testJpaClElementStatisticsCompareTo() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
JpaClElementStatistics otherJpaClElementStatistics = new JpaClElementStatistics(testJpaClElementStatistics);
@@ -141,7 +141,7 @@ public class JpaClElementStatisticsTest {
}
@Test
- public void testJpaClElementStatisticsLombok() {
+ void testJpaClElementStatisticsLombok() {
assertNotNull(new Participant());
JpaClElementStatistics cles0 = new JpaClElementStatistics();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
index 032d655e3..63c5ea3ab 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopElementTest.java
@@ -30,7 +30,7 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElement;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
@@ -45,12 +45,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the {@link JpaControlLoopElement} class.
*/
-public class JpaControlLoopElementTest {
+class JpaControlLoopElementTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaControlLoopElementConstructor() {
+ void testJpaControlLoopElementConstructor() {
assertThatThrownBy(() -> {
new JpaControlLoopElement((JpaControlLoopElement) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
@@ -130,7 +130,7 @@ public class JpaControlLoopElementTest {
}
@Test
- public void testJpaControlLoopElement() {
+ void testJpaControlLoopElement() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
ControlLoopElement cle = createControlLoopElementInstance();
@@ -174,7 +174,7 @@ public class JpaControlLoopElementTest {
}
@Test
- public void testJpaControlLoopElementOrderedState() throws CoderException {
+ void testJpaControlLoopElementOrderedState() throws CoderException {
ControlLoopElement testControlLoopElement = createControlLoopElementInstance();
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
@@ -193,7 +193,7 @@ public class JpaControlLoopElementTest {
}
@Test
- public void testJpaControlLoopElementValidation() {
+ void testJpaControlLoopElementValidation() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
assertThatThrownBy(() -> {
@@ -204,7 +204,7 @@ public class JpaControlLoopElementTest {
}
@Test
- public void testJpaControlLoopElementCompareTo() {
+ void testJpaControlLoopElementCompareTo() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
JpaControlLoopElement otherJpaControlLoopElement = new JpaControlLoopElement(testJpaControlLoopElement);
@@ -249,7 +249,7 @@ public class JpaControlLoopElementTest {
}
@Test
- public void testJpaControlLoopElementLombok() {
+ void testJpaControlLoopElementLombok() {
assertNotNull(new Participant());
JpaControlLoopElement cle0 = new JpaControlLoopElement();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
index 01062b046..ff6cc7619 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaControlLoopTest.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.LinkedHashMap;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
@@ -44,12 +44,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the {@link JpaControlLoopTest} class.
*/
-public class JpaControlLoopTest {
+class JpaControlLoopTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaControlLoopConstructor() {
+ void testJpaControlLoopConstructor() {
assertThatThrownBy(() -> {
new JpaControlLoop((JpaControlLoop) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
@@ -125,7 +125,7 @@ public class JpaControlLoopTest {
}
@Test
- public void testJpaControlLoop() {
+ void testJpaControlLoop() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
ControlLoop participant = createControlLoopInstance();
@@ -165,7 +165,7 @@ public class JpaControlLoopTest {
}
@Test
- public void testJpaControlLoopElementOrderedState() throws CoderException {
+ void testJpaControlLoopElementOrderedState() throws CoderException {
ControlLoop testControlLoop = createControlLoopInstance();
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
@@ -195,7 +195,7 @@ public class JpaControlLoopTest {
}
@Test
- public void testJpaControlLoopValidation() {
+ void testJpaControlLoopValidation() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
assertThatThrownBy(() -> {
@@ -206,7 +206,7 @@ public class JpaControlLoopTest {
}
@Test
- public void testJpaControlLoopCompareTo() {
+ void testJpaControlLoopCompareTo() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
JpaControlLoop otherJpaControlLoop = new JpaControlLoop(testJpaControlLoop);
@@ -244,7 +244,7 @@ public class JpaControlLoopTest {
}
@Test
- public void testJpaControlLoopLombok() {
+ void testJpaControlLoopLombok() {
assertNotNull(new ControlLoop());
JpaControlLoop cl0 = new JpaControlLoop();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantStatisticsTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantStatisticsTest.java
index 7eedd245b..aff365515 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantStatisticsTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantStatisticsTest.java
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantHealthStatus;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
@@ -41,12 +41,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the {@link JpaParticipantStatistics} class.
*/
-public class JpaParticipantStatisticsTest {
+class JpaParticipantStatisticsTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaParticipantStatisticsConstructor() {
+ void testJpaParticipantStatisticsConstructor() {
assertThatThrownBy(() -> {
new JpaParticipantStatistics((JpaParticipantStatistics) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
@@ -73,7 +73,7 @@ public class JpaParticipantStatisticsTest {
}
@Test
- public void testJpaParticipantStatistics() {
+ void testJpaParticipantStatistics() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
ParticipantStatistics cles = createParticipantStatisticsInstance();
@@ -114,7 +114,7 @@ public class JpaParticipantStatisticsTest {
}
@Test
- public void testJpaParticipantStatisticsValidation() {
+ void testJpaParticipantStatisticsValidation() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
assertThatThrownBy(() -> {
@@ -126,7 +126,7 @@ public class JpaParticipantStatisticsTest {
}
@Test
- public void testJpaParticipantStatisticsConmpareTo() {
+ void testJpaParticipantStatisticsConmpareTo() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
JpaParticipantStatistics otherJpaParticipantStatistics =
@@ -145,7 +145,7 @@ public class JpaParticipantStatisticsTest {
}
@Test
- public void testJpaParticipantStatisticsLombok() {
+ void testJpaParticipantStatisticsLombok() {
assertNotNull(new Participant());
JpaParticipantStatistics ps0 = new JpaParticipantStatistics();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
index 5c96df6f1..e2eb5154f 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantHealthStatus;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
@@ -37,12 +37,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the {@link JpaParticiant} class.
*/
-public class JpaParticipantTest {
+class JpaParticipantTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaParticipantConstructor() {
+ void testJpaParticipantConstructor() {
assertThatThrownBy(() -> {
new JpaParticipant((JpaParticipant) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
@@ -118,7 +118,7 @@ public class JpaParticipantTest {
}
@Test
- public void testJpaParticipant() {
+ void testJpaParticipant() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
Participant participant = createParticipantInstance();
@@ -158,7 +158,7 @@ public class JpaParticipantTest {
}
@Test
- public void testJpaParticipantValidation() {
+ void testJpaParticipantValidation() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
assertThatThrownBy(() -> {
@@ -169,7 +169,7 @@ public class JpaParticipantTest {
}
@Test
- public void testJpaParticipantCompareTo() {
+ void testJpaParticipantCompareTo() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
JpaParticipant otherJpaParticipant = new JpaParticipant(testJpaParticipant);
@@ -202,7 +202,7 @@ public class JpaParticipantTest {
}
@Test
- public void testJpaParticipantLombok() {
+ void testJpaParticipantLombok() {
assertNotNull(new Participant());
JpaParticipant p0 = new JpaParticipant();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/PojosTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/PojosTest.java
index 9e21b216b..c877f9696 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/PojosTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/PojosTest.java
@@ -31,16 +31,16 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class PojosTest {
+class PojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(PojosTest.class.getPackageName());
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProviderTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProviderTest.java
index eb6a02898..a9ef9148f 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProviderTest.java
@@ -27,9 +27,9 @@ import static org.junit.Assert.assertEquals;
import java.time.Instant;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatisticsList;
import org.onap.policy.common.utils.coder.Coder;
@@ -38,7 +38,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ClElementStatisticsProviderTest {
+class ClElementStatisticsProviderTest {
private static final String LIST_IS_NULL = ".*. is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
private static final String CL_ELEMENT_STATS_JSON = "src/test/resources/providers/TestClElementStatistics.json";
@@ -55,8 +55,8 @@ public class ClElementStatisticsProviderTest {
*
* @throws Exception on errors
*/
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
@@ -71,13 +71,13 @@ public class ClElementStatisticsProviderTest {
inputClElementStats = CODER.decode(originalJson, ClElementStatisticsList.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
clElementStatisticsProvider.close();
}
@Test
- public void testClElementStatisticsCreate() throws Exception {
+ void testClElementStatisticsCreate() throws Exception {
assertThatThrownBy(() -> {
clElementStatisticsProvider.createClElementStatistics(null);
}).hasMessageMatching(LIST_IS_NULL);
@@ -91,7 +91,7 @@ public class ClElementStatisticsProviderTest {
}
@Test
- public void testGetClElementStatistics() throws Exception {
+ void testGetClElementStatistics() throws Exception {
List<ClElementStatistics> getResponse;
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
index d362c2718..8aec568b2 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ControlLoopProviderTest.java
@@ -27,9 +27,9 @@ import static org.junit.Assert.assertNull;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoops;
@@ -40,7 +40,7 @@ import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
-public class ControlLoopProviderTest {
+class ControlLoopProviderTest {
private static final String LIST_IS_NULL = "controlLoops is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
@@ -56,8 +56,8 @@ public class ControlLoopProviderTest {
private String originalJson = ResourceUtils.getResourceAsString(CONTROL_LOOP_JSON);
private String updateClJson = ResourceUtils.getResourceAsString(UPDATE_CL_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
@@ -74,13 +74,13 @@ public class ControlLoopProviderTest {
updateControlLoops = CODER.decode(updateClJson, ControlLoops.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
controlLoopProvider.close();
}
@Test
- public void testControlLoopCreate() throws Exception {
+ void testControlLoopCreate() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.createControlLoops(null);
}).hasMessageMatching(LIST_IS_NULL);
@@ -93,7 +93,7 @@ public class ControlLoopProviderTest {
}
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<ControlLoop> getResponse;
@@ -122,7 +122,7 @@ public class ControlLoopProviderTest {
}
@Test
- public void testUpdateControlLoops() throws Exception {
+ void testUpdateControlLoops() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.updateControlLoops(null);
}).hasMessageMatching("controlLoops is marked .*ull but is null");
@@ -137,7 +137,7 @@ public class ControlLoopProviderTest {
}
@Test
- public void testDeleteControlLoop() throws Exception {
+ void testDeleteControlLoop() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.deleteControlLoop("Invalid_name", "1.0.1");
}).hasMessageMatching(".*.failed, control loop does not exist");
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProviderTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProviderTest.java
index 41c106577..681ca96ce 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantProviderTest.java
@@ -27,9 +27,9 @@ import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.common.utils.coder.Coder;
@@ -38,7 +38,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
-public class ParticipantProviderTest {
+class ParticipantProviderTest {
private static final Coder CODER = new StandardCoder();
private static final String PARTICIPANT_JSON =
@@ -53,8 +53,8 @@ public class ParticipantProviderTest {
private Participant updateParticipants;
private String originalJson = ResourceUtils.getResourceAsString(PARTICIPANT_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
@@ -70,13 +70,13 @@ public class ParticipantProviderTest {
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
participantProvider.close();
}
@Test
- public void testParticipantCreate() throws Exception {
+ void testParticipantCreate() throws Exception {
assertThatThrownBy(() -> {
participantProvider.createParticipants(null);
}).hasMessageMatching(LIST_IS_NULL);
@@ -91,7 +91,7 @@ public class ParticipantProviderTest {
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<Participant> getResponse;
@@ -117,7 +117,7 @@ public class ParticipantProviderTest {
}
@Test
- public void testUpdateParticipant() throws Exception {
+ void testUpdateParticipant() throws Exception {
assertThatThrownBy(() -> {
participantProvider.updateParticipants(null);
}).hasMessageMatching("participants is marked .*ull but is null");
@@ -134,7 +134,7 @@ public class ParticipantProviderTest {
}
@Test
- public void testDeleteParticipant() throws Exception {
+ void testDeleteParticipant() throws Exception {
assertThatThrownBy(() -> {
participantProvider.deleteParticipant("Invalid_name", "1.0.1");
}).hasMessageMatching(".*.failed, participant does not exist");
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProviderTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProviderTest.java
index 0fd3693c0..8191dd618 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProviderTest.java
@@ -27,9 +27,9 @@ import static org.junit.Assert.assertEquals;
import java.time.Instant;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantStatisticsList;
import org.onap.policy.common.utils.coder.Coder;
@@ -38,7 +38,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatisticsProviderTest {
+class ParticipantStatisticsProviderTest {
private static final String LIST_IS_NULL = ".*. is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
@@ -51,8 +51,8 @@ public class ParticipantStatisticsProviderTest {
private ParticipantStatisticsList inputParticipantStatistics;
private String originalJson = ResourceUtils.getResourceAsString(PARTICIPANT_STATS_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
@@ -67,13 +67,13 @@ public class ParticipantStatisticsProviderTest {
inputParticipantStatistics = CODER.decode(originalJson, ParticipantStatisticsList.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
participantStatisticsProvider.close();
}
@Test
- public void testParticipantStatisticsCreate() throws Exception {
+ void testParticipantStatisticsCreate() throws Exception {
assertThatThrownBy(() -> {
participantStatisticsProvider.createParticipantStatistics(null);
}).hasMessageMatching(LIST_IS_NULL);
@@ -87,7 +87,7 @@ public class ParticipantStatisticsProviderTest {
}
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<ParticipantStatistics> getResponse;
// Return empty list when no data present in db
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopNotificationTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopNotificationTest.java
index d1e3dcfcc..bf2e2fa0a 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopNotificationTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopNotificationTest.java
@@ -26,12 +26,12 @@ import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class ControlLoopNotificationTest {
+class ControlLoopNotificationTest {
@Test
- public void testControlLoopNotification() {
+ void testControlLoopNotification() {
ControlLoopNotification cln0 = new ControlLoopNotification();
List<ControlLoopStatus> addedList = new ArrayList<>();
@@ -61,7 +61,7 @@ public class ControlLoopNotificationTest {
}
@Test
- public void testControlLoopNotificationLombok() {
+ void testControlLoopNotificationLombok() {
assertNotNull(new ControlLoopNotification());
assertNotNull(new ControlLoopNotification(new ArrayList<>(), new ArrayList<>()));
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopStatusTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopStatusTest.java
index d1ddbf4e6..cca5e8554 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopStatusTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/ControlLoopStatusTest.java
@@ -25,13 +25,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopStatusTest {
+class ControlLoopStatusTest {
@Test
- public void testControlLoopStatusLombok() {
+ void testControlLoopStatusLombok() {
assertNotNull(new ControlLoopStatus());
assertNotNull(new ControlLoopStatus(UUID.randomUUID(), new ToscaConceptIdentifier()));
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/NotificationPojosTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/NotificationPojosTest.java
index 6ea07be76..1a89a1b3e 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/NotificationPojosTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/notification/NotificationPojosTest.java
@@ -29,16 +29,16 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class NotificationPojosTest {
+class NotificationPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(NotificationPojosTest.class.getPackageName());
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java
index 06d6ecf77..c37268ac0 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopStateChangeTest.java
@@ -26,17 +26,17 @@ import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participan
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and other methods.
*/
-public class ParticipantControlLoopStateChangeTest {
+class ParticipantControlLoopStateChangeTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantControlLoopStateChange orig = new ParticipantControlLoopStateChange();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopUpdateTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopUpdateTest.java
index 4397bf158..5d87095ba 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopUpdateTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantControlLoopUpdateTest.java
@@ -27,7 +27,7 @@ import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participan
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
@@ -35,9 +35,9 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
/**
* Test the copy constructor.
*/
-public class ParticipantControlLoopUpdateTest {
+class ParticipantControlLoopUpdateTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantControlLoopUpdate(null)).isInstanceOf(NullPointerException.class);
ParticipantControlLoopUpdate orig = new ParticipantControlLoopUpdate();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java
index 1cc356627..7f595fbbb 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantHealthCheckTest.java
@@ -26,17 +26,17 @@ import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participan
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and other methods.
*/
-public class ParticipantHealthCheckTest {
+class ParticipantHealthCheckTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantHealthCheck orig = new ParticipantHealthCheck();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
index d27d3a22c..8d644f1f1 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantMessageTest.java
@@ -27,14 +27,14 @@ import static org.junit.Assert.assertTrue;
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantMessageTest {
+class ParticipantMessageTest {
private ParticipantMessage message;
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantMessage((ParticipantMessage) null))
.isInstanceOf(NullPointerException.class);
@@ -54,7 +54,7 @@ public class ParticipantMessageTest {
}
@Test
- public void testAppliesTo_NullParticipantId() {
+ void testAppliesTo_NullParticipantId() {
message = makeMessage();
assertThatThrownBy(() -> message.appliesTo(null, null)).isInstanceOf(NullPointerException.class);
@@ -65,7 +65,7 @@ public class ParticipantMessageTest {
}
@Test
- public void testAppliesTo_ParticipantIdMatches() {
+ void testAppliesTo_ParticipantIdMatches() {
message = makeMessage();
// ParticipantId matches
@@ -78,7 +78,7 @@ public class ParticipantMessageTest {
}
@Test
- public void testAppliesTo_ParticipantIdNoMatch() {
+ void testAppliesTo_ParticipantIdNoMatch() {
message = makeMessage();
// ParticipantId does not match
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantPojosTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantPojosTest.java
index 301f9acc0..af8eaa8eb 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantPojosTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantPojosTest.java
@@ -29,16 +29,16 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class ParticipantPojosTest {
+class ParticipantPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(ParticipantPojosTest.class.getPackageName());
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java
index 235532681..6c73c6d3e 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStateChangeTest.java
@@ -26,17 +26,17 @@ import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participan
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and the other methods.
*/
-public class ParticipantStateChangeTest {
+class ParticipantStateChangeTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantStateChange orig = new ParticipantStateChange();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
index 9b5722bce..706e58b91 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
@@ -26,14 +26,14 @@ import static org.onap.policy.clamp.controlloop.models.messages.dmaap.participan
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatusTest {
+class ParticipantStatusTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStatus(null)).isInstanceOf(NullPointerException.class);
final ParticipantStatus orig = new ParticipantStatus();
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/MessagesRestPojosTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/MessagesRestPojosTest.java
index 299a580d3..435cce8ef 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/MessagesRestPojosTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/MessagesRestPojosTest.java
@@ -29,16 +29,16 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class MessagesRestPojosTest {
+class MessagesRestPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClassesRecursively(MessagesRestPojosTest.class.getPackageName(), null);
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/InstantiationCommandTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/InstantiationCommandTest.java
index 6bda3b736..c9902753f 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/InstantiationCommandTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/InstantiationCommandTest.java
@@ -26,12 +26,12 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
-public class InstantiationCommandTest {
+class InstantiationCommandTest {
@Test
- public void testInstantiationCommandLombok() {
+ void testInstantiationCommandLombok() {
assertNotNull(new InstantiationCommand());
InstantiationCommand ic0 = new InstantiationCommand();