Convert models to JUnit 5 13/138313/3
authorwaynedunican <wayne.dunican@est.tech>
Thu, 13 Jun 2024 08:24:00 +0000 (09:24 +0100)
committerwaynedunican <wayne.dunican@est.tech>
Mon, 24 Jun 2024 15:30:48 +0000 (16:30 +0100)
Review for models-impl

Issue-ID: POLICY-5042
Change-Id: I22ff90b12da3fb2ba4d0eead7afb9282eac6921f
Signed-off-by: waynedunican <wayne.dunican@est.tech>
81 files changed:
models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiCqResponseTest.java
models-interactions/model-impl/aai/src/test/java/org/onap/policy/aai/AaiManagerTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/EnumsTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/util/SerializationTest.java
models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmCommonHeaderTest.java
models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmModelsTest.java
models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmOutputTest.java
models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmResponseCodeTest.java
models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java
models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptorTest.java
models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventStatusTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopEventTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTypeTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationWrapperTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopResponseTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopEventTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/PhysicalControlLoopNotificationTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopEventTest.java
models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/VirtualControlLoopNotificationTest.java
models-interactions/model-impl/guard/src/test/java/org/onap/policy/guard/OperationsHistoryTest.java
models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/DemoTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealAdditionalParamsTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealRequestTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncHealServiceInfoTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncRequestTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseDescriptorTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/SdncResponseTest.java
models-interactions/model-impl/sdnc/src/test/java/org/onap/policy/sdnc/util/SerializationTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseCodeTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/SdnrTest.java
models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/util/SerializationTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServer.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequest3gppTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestCllTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
models-interactions/model-impl/vfc/src/test/java/org/onap/policy/vfc/util/SerializationTest.java

index bc832ed..c7910b1 100644 (file)
@@ -3,6 +3,7 @@
  *
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.aai;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.File;
 import java.nio.charset.StandardCharsets;
@@ -31,7 +32,7 @@ import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.aai.domain.yang.CloudRegion;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.ModelVer;
@@ -42,7 +43,7 @@ import org.onap.aai.domain.yang.Vserver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class AaiCqResponseTest {
+class AaiCqResponseTest {
     private static final String ETE_VFMODULE = "Vfmodule_Ete_vFWCLvFWSNK_7ba1fbde_0";
     private static final String ETE_VNF = "Ete_vFWCLvFWSNK_7ba1fbde_0";
     private static final Logger LOGGER = LoggerFactory.getLogger(AaiCqResponseTest.class);
@@ -50,7 +51,7 @@ public class AaiCqResponseTest {
         "src/test/resources/org/onap/policy/aai/AaiCqResponseFull.json";
 
     @Test
-    public void testConstructor() throws Exception {
+    void testConstructor() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -60,7 +61,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testMultiThreaded() throws Exception {
+    void testMultiThreaded() throws Exception {
         final AtomicInteger success = new AtomicInteger(0);
         final String json = getAaiCqResponse();
 
@@ -81,7 +82,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testAaiMalformedCqResponse() throws Exception {
+    void testAaiMalformedCqResponse() throws Exception {
         String responseString = Files.readString(
                         new File("src/test/resources/org/onap/policy/aai/AaiMalformedCqResponse.json").toPath(),
                         StandardCharsets.UTF_8);
@@ -95,7 +96,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetItemByList() throws Exception {
+    void testGetItemByList() throws Exception {
         /*
          * Read JSON String and add all AaiObjects
          */
@@ -113,7 +114,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetServiceInstance() throws Exception {
+    void testGetServiceInstance() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -126,7 +127,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetDefaultCloudRegion() throws Exception {
+    void testGetDefaultCloudRegion() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -138,7 +139,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetDefaultTenant() throws Exception {
+    void testGetDefaultTenant() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -150,7 +151,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetGenericVnfs() throws Exception {
+    void testGetGenericVnfs() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -164,7 +165,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetDefaultGenericVnf() throws Exception {
+    void testGetDefaultGenericVnf() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -177,7 +178,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetGenericVnfByName() throws Exception {
+    void testGetGenericVnfByName() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -189,7 +190,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetGenericVnfByModelInvariantId() throws Exception {
+    void testGetGenericVnfByModelInvariantId() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -202,7 +203,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetGenericVnfByVfModuleModelInvariantId() throws Exception {
+    void testGetGenericVnfByVfModuleModelInvariantId() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -215,7 +216,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetAllVfModules() throws Exception {
+    void testGetAllVfModules() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -229,7 +230,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetVfModuleByVfModuleName() throws Exception {
+    void testGetVfModuleByVfModuleName() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -242,7 +243,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetVfModuleByVfModelInvariantId() throws Exception {
+    void testGetVfModuleByVfModelInvariantId() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -256,7 +257,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetDefaultVfModule() throws Exception {
+    void testGetDefaultVfModule() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -268,7 +269,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetVserver() throws Exception {
+    void testGetVserver() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -281,7 +282,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetAllModelVer() throws Exception {
+    void testGetAllModelVer() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -295,7 +296,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetModelVerByVersionId() throws Exception {
+    void testGetModelVerByVersionId() throws Exception {
         String responseString = getAaiCqResponse();
 
         AaiCqResponse aaiCqResponse;
@@ -309,7 +310,7 @@ public class AaiCqResponseTest {
     }
 
     @Test
-    public void testGetVfModuleCount() throws Exception {
+    void testGetVfModuleCount() throws Exception {
         String responseString = getAaiCqResponse();
         AaiCqResponse aaiCqResponse = new AaiCqResponse(responseString);
         int count = aaiCqResponse.getVfModuleCount("47958575-138f-452a-8c8d-d89b595f8164",
index 9b20fe9..1d8253c 100644 (file)
@@ -3,7 +3,7 @@
  * aai
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,9 +21,9 @@
 
 package org.onap.policy.aai;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.mockito.ArgumentMatchers.anyMap;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.contains;
@@ -38,11 +38,11 @@ import java.nio.file.Files;
 import java.util.Map;
 import java.util.UUID;
 import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.rest.RestManager;
 
-public class AaiManagerTest {
+class AaiManagerTest {
     private static final String CQ_QUERY_URL = "http://testing.cq.query";
     private static final String DOROTHY = "Dorothy";
     private static final String SOME_URL = "http://somewhere.over.the.rainbow";
@@ -60,8 +60,8 @@ public class AaiManagerTest {
      *
      * @throws Exception if error occurs
      */
-    @Before
-    public void beforeTestAaiManager() throws Exception {
+    @BeforeEach
+    void beforeTestAaiManager() throws Exception {
         restManagerMock = mock(RestManager.class);
 
         String aaiCqResponse = new AaiCqResponseTest().getAaiCqResponse();
@@ -75,7 +75,7 @@ public class AaiManagerTest {
 
 
     @Test
-    public void testAaiCqResponse() {
+    void testAaiCqResponse() {
         AaiManager aaiManager = new AaiManager(restManagerMock);
         assertNotNull(aaiManager);
 
@@ -115,7 +115,7 @@ public class AaiManagerTest {
 
 
     @Test
-    public void testAaiManagerGetPnf() {
+    void testAaiManagerGetPnf() {
         AaiManager aaiManager = new AaiManager(restManagerMock);
         assertNotNull(aaiManager);
         String pnfName = "test-pnf";
index 8c00fd5..72a7814 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@
 package org.onap.policy.appc;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.time.Instant;
 import java.util.ArrayList;
@@ -32,16 +32,16 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class CommonHeaderTest {
+class CommonHeaderTest {
 
     private static final String KANSAS = "Kansas";
     private static final String DOROTHY = "Dorothy";
     private static final String CAN_I_GO_HOME = "Can I go home?";
 
     @Test
-    public void testCommonHeader() {
+    void testCommonHeader() {
         CommonHeader commonHeader = new CommonHeader();
         assertNotNull(commonHeader);
         assertNotNull(new CommonHeader(commonHeader));
index bc4429f..9986124 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.appc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class EnumsTest {
+class EnumsTest {
 
     @Test
-    public void testResponseCode() {
+    void testResponseCode() {
         assertEquals(5, ResponseCode.values().length);
 
         assertNull(ResponseCode.toResponseCode(0));
@@ -54,7 +54,7 @@ public class EnumsTest {
     }
 
     @Test
-    public void testResponseValue() {
+    void testResponseValue() {
         assertEquals(5, ResponseValue.values().length);
 
         assertNull(ResponseValue.toResponseValue("Dorothy"));
index 52b974c..7ab4ae7 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.appc;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.HashMap;
 import java.util.Map;
 import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class RequestTest {
+class RequestTest {
 
     private static final String WIZARD = "Wizard";
     private static final String GO_TO_OZ = "Go to Oz";
 
     @Test
-    public void testRequest() {
+    void testRequest() {
         Request request = new Request();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index cd4e2a6..a13e08f 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.appc;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ResponseStatusTest {
+class ResponseStatusTest {
 
     private static final String THERE_S_NO_PLACE_LIKE_HOME = "There's no place like home";
     private static final String THE_WONDERFUL_LAND_OF_OZ = "The wonderful land of Oz";
 
     @Test
-    public void testResonseStatus() {
+    void testResponseStatus() {
         ResponseStatus status = new ResponseStatus();
         assertNotNull(status);
         assertNotEquals(0, status.hashCode());
index 42e5a6d..ee0ff37 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.appc;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.HashMap;
 import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ResponseTest {
+class ResponseTest {
 
     @Test
-    public void testResonse() {
+    void testResonse() {
         Response response = new Response();
         assertNotNull(response);
         assertNotNull(new Response(new Request()));
index 93c3c9e..0bf35bc 100644 (file)
@@ -3,7 +3,7 @@
  * appc
  * ================================================================================
  * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.appc.util;
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import com.google.gson.JsonParseException;
 import java.time.Instant;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SerializationTest {
+class SerializationTest {
 
     @Test
-    public void test() {
+    void test() {
         String nameString = "Dorothy";
         String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
         assertEquals("\"Dorothy\"", jsonName);
index 1c71c85..785de69 100644 (file)
@@ -3,7 +3,7 @@
  * appclcm
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.appclcm;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class AppcLcmCommonHeaderTest {
+class AppcLcmCommonHeaderTest {
 
     @Test
-    public void testAppcLcmCommonHeaderConstructor() {
+    void testAppcLcmCommonHeaderConstructor() {
         AppcLcmCommonHeader commonHeader = new AppcLcmCommonHeader("Policy", UUID.randomUUID(), "1");
         AppcLcmCommonHeader commonHeaderCopy = new AppcLcmCommonHeader(commonHeader);
         assertEquals(commonHeader, commonHeaderCopy);
index d1a02ea..61d73b7 100644 (file)
@@ -3,6 +3,7 @@
  * appclcm
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,14 +27,14 @@ import com.openpojo.validation.Validator;
 import com.openpojo.validation.ValidatorBuilder;
 import com.openpojo.validation.test.impl.GetterTester;
 import com.openpojo.validation.test.impl.SetterTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.common.utils.test.ToStringTester;
 
-public class AppcLcmModelsTest {
+class AppcLcmModelsTest {
     private static final String POJO_PACKAGE = "org.onap.policy.appclcm";
 
     @Test
-    public void testAppcLcmModels() {
+    void testAppcLcmModels() {
         final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester())
                 .with(new GetterTester()).build();
 
index 1490416..31d6bca 100644 (file)
@@ -3,7 +3,7 @@
  * appclcm
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.appclcm;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class AppcLcmOutputTest {
+class AppcLcmOutputTest {
 
     @Test
-    public void testAppcLcmOutput() {
+    void testAppcLcmOutput() {
         AppcLcmCommonHeader commonHeader = new AppcLcmCommonHeader("Policy", UUID.randomUUID(), "1");
         Map<String, String> actionIdentifiers = new HashMap<>();
         AppcLcmInput input = new AppcLcmInput(commonHeader, "testAction", actionIdentifiers, "testPayload");
index 4cadd1e..300b05e 100644 (file)
@@ -3,6 +3,7 @@
  * appclcm
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.appclcm;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class AppcLcmResponseCodeTest {
+class AppcLcmResponseCodeTest {
 
     @Test
-    public void testAppcLcmResponseCode() {
+    void testAppcLcmResponseCode() {
         assertNull(AppcLcmResponseCode.toResponseValue(0));
 
         assertEquals(AppcLcmResponseCode.ACCEPTED, AppcLcmResponseCode.toResponseValue(100));
index 52c2c54..5435702 100644 (file)
@@ -3,7 +3,7 @@
  * appclcm
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.appclcm.util;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.time.Instant;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SerializationTest {
+class SerializationTest {
 
     @Test
-    public void test() {
+    void test() {
         String nameString = "Dorothy";
         String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
         assertEquals("\"Dorothy\"", jsonName);
index 3192520..83107ae 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Bell Canada.
  * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +20,7 @@
 
 package org.onap.policy.cds.client;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.AdditionalAnswers.delegatesTo;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -40,9 +41,8 @@ import io.grpc.testing.GrpcCleanupRule;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.Base64;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.ArgumentMatchers;
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc;
@@ -51,15 +51,14 @@ import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessin
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput;
 import org.onap.policy.cds.properties.CdsServerProperties;
 
-public class BasicAuthClientHeaderInterceptorTest {
+class BasicAuthClientHeaderInterceptorTest {
 
     // Generate a unique in-process server name.
     private static final String SERVER_NAME = InProcessServerBuilder.generateName();
     private static final String CREDS = "test";
 
     // Manages automatic graceful shutdown for the registered server and client channels at the end of test.
-    @Rule
-    public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
+    private final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
 
     private final ServerInterceptor mockCdsGrpcServerInterceptor = mock(ServerInterceptor.class,
         delegatesTo(new TestServerInterceptor()));
@@ -73,8 +72,8 @@ public class BasicAuthClientHeaderInterceptorTest {
      *
      * @throws IOException on failure to register the test grpc server for graceful shutdown
      */
-    @Before
-    public void setUp() throws IOException {
+    @BeforeEach
+    void setUp() throws IOException {
         // Setup the CDS properties
         props.setHost(SERVER_NAME);
         props.setPort(2000);
@@ -95,7 +94,7 @@ public class BasicAuthClientHeaderInterceptorTest {
     }
 
     @Test
-    public void testIfBasicAuthHeaderIsDeliveredToCdsServer() {
+    void testIfBasicAuthHeaderIsDeliveredToCdsServer() {
         BluePrintProcessingServiceStub bpProcessingSvcStub = BluePrintProcessingServiceGrpc
             .newStub(ClientInterceptors.intercept(channel, new BasicAuthClientHeaderInterceptor(props)));
         ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
@@ -129,10 +128,9 @@ public class BasicAuthClientHeaderInterceptorTest {
 
         @Override
         public <Q, P> Listener<Q> interceptCall(final ServerCall<Q, P> serverCall,
-                        final Metadata metadata, final ServerCallHandler<Q, P> serverCallHandler) {
+                                                final Metadata metadata, final ServerCallHandler<Q, P>
+                                                            serverCallHandler) {
             return serverCallHandler.startCall(serverCall, metadata);
         }
     }
 }
-
-
index 0922fc4..1a35064 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 Bell Canada.
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,8 +21,9 @@
 package org.onap.policy.cds.client;
 
 import static org.assertj.core.api.Assertions.assertThatCode;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
@@ -30,7 +32,6 @@ import io.grpc.ManagedChannel;
 import io.grpc.inprocess.InProcessChannelBuilder;
 import io.grpc.inprocess.InProcessServerBuilder;
 import io.grpc.stub.StreamObserver;
-import io.grpc.testing.GrpcCleanupRule;
 import io.grpc.util.MutableHandlerRegistry;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -39,10 +40,9 @@ import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-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.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase;
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
@@ -51,22 +51,16 @@ import org.onap.policy.cds.api.CdsProcessorListener;
 import org.onap.policy.cds.api.TestCdsProcessorListenerImpl;
 import org.onap.policy.cds.properties.CdsServerProperties;
 
-public class CdsProcessorGrpcClientTest {
+class CdsProcessorGrpcClientTest {
 
-    // Generate a unique in-process server name.
-    private static final String SERVER_NAME = InProcessServerBuilder.generateName();
-
-    // Manages automatic graceful shutdown for the registered server and client channels at the end of test.
-    @Rule
-    public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
-
-    private final CdsProcessorListener listener = spy(new TestCdsProcessorListenerImpl());
-    private final CdsServerProperties props = new CdsServerProperties();
-    private final MutableHandlerRegistry serviceRegistry = new MutableHandlerRegistry();
-    private final AtomicReference<StreamObserver<ExecutionServiceOutput>> responseObserverRef = new AtomicReference<>();
-    private final List<String> messagesDelivered = new ArrayList<>();
-    private final CountDownLatch allRequestsDelivered = new CountDownLatch(1);
+    private CdsProcessorListener listener;
+    private CdsServerProperties props;
+    private MutableHandlerRegistry serviceRegistry;
+    private AtomicReference<StreamObserver<ExecutionServiceOutput>> responseObserverRef;
+    private List<String> messagesDelivered;
+    private CountDownLatch allRequestsDelivered;
 
+    private ManagedChannel channel;
     private CdsProcessorGrpcClient client;
 
     /**
@@ -74,22 +68,31 @@ public class CdsProcessorGrpcClientTest {
      *
      * @throws IOException on failure to register the test grpc server for graceful shutdown
      */
-    @Before
-    public void setUp() throws IOException {
+    @BeforeEach
+    void setUp() throws IOException {
+
+        listener = spy(new TestCdsProcessorListenerImpl());
+        props = new CdsServerProperties();
+        serviceRegistry = new MutableHandlerRegistry();
+        responseObserverRef = new AtomicReference<>();
+        messagesDelivered = new ArrayList<>();
+        allRequestsDelivered = new CountDownLatch(1);
+
         // Setup the CDS properties
-        props.setHost(SERVER_NAME);
+        // Generate a unique in-process server name.
+        String serverName = InProcessServerBuilder.generateName();
+        props.setHost(serverName);
         props.setPort(2000);
         props.setUsername("testUser");
         props.setPassword("testPassword");
         props.setTimeout(60);
 
         // Create a server, add service, start, and register for automatic graceful shutdown.
-        grpcCleanup.register(InProcessServerBuilder.forName(SERVER_NAME)
-            .fallbackHandlerRegistry(serviceRegistry).directExecutor().build().start());
+        InProcessServerBuilder.forName(serverName)
+            .fallbackHandlerRegistry(serviceRegistry).directExecutor().build().start();
 
-        // Create a client channel and register for automatic graceful shutdown
-        ManagedChannel channel = grpcCleanup
-            .register(InProcessChannelBuilder.forName(SERVER_NAME).directExecutor().build());
+        // Create a client channel
+        channel = InProcessChannelBuilder.forName(serverName).directExecutor().build();
 
         // Create an instance of the gRPC client
         client = new CdsProcessorGrpcClient(channel, new CdsProcessorHandler(listener, "gRPC://localhost:1234/"));
@@ -122,24 +125,40 @@ public class CdsProcessorGrpcClientTest {
         serviceRegistry.addService(testCdsBlueprintServerImpl);
     }
 
-    @After
-    public void tearDown() {
-        client.close();
+    /**
+     * Cleans up resources after each test execution.
+     * This method ensures that the gRPC client and channel are properly closed and released after each test.
+     * It is annotated with {@code @AfterEach} to automatically run after each test method in the class.
+     * If the {@code client} is not {@code null}, it calls the {@code close} method to release resources
+     *     used by the client.
+     * If the {@code channel} is not {@code null}, it calls the {@code shutdownNow} method
+     *     to forcefully close the channel.
+     */
+    @AfterEach
+    void tearDown() {
+        if (client != null) {
+            client.close();
+        }
+        if (channel != null) {
+            channel.shutdownNow();
+        }
     }
 
     @Test
-    public void testCdsProcessorGrpcClientConstructor() {
+    void testCdsProcessorGrpcClientConstructor() {
         assertThatCode(() -> new CdsProcessorGrpcClient(listener, props).close()).doesNotThrowAnyException();
     }
 
-    @Test(expected = IllegalStateException.class)
-    public void testCdsProcessorGrpcClientConstructorFailure() {
+    @Test
+    void testCdsProcessorGrpcClientConstructorFailure() {
         props.setHost(null);
-        new CdsProcessorGrpcClient(listener, props).close();
+        assertThrows(IllegalStateException.class, () -> {
+            new CdsProcessorGrpcClient(listener, props).close();
+        });
     }
 
     @Test
-    public void testSendRequestFail() throws InterruptedException {
+    void testSendRequestFail() throws InterruptedException {
         // Setup
         ExecutionServiceInput testReq = ExecutionServiceInput.newBuilder()
             .setActionIdentifiers(ActionIdentifiers.newBuilder().setActionName("policy-to-cds").build())
@@ -154,7 +173,7 @@ public class CdsProcessorGrpcClientTest {
     }
 
     @Test
-    public void testSendRequestSuccess() throws InterruptedException {
+    void testSendRequestSuccess() throws InterruptedException {
         // Setup request
         ExecutionServiceInput testReq1 = ExecutionServiceInput.newBuilder()
             .setActionIdentifiers(ActionIdentifiers.newBuilder().setActionName("policy-to-cds-req1").build()).build();
index 22ef769..a2be4e6 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.controlloop;
 
 import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class AbatedTest {
+class AbatedTest {
 
     @Test
-    public void testConstructors() {
+    void testConstructors() {
         VirtualControlLoopEvent event = new VirtualControlLoopEvent();
         event.setClosedLoopEventStatus(ControlLoopEventStatus.ABATED);
         event.setClosedLoopAlarmStart(Instant.now());
@@ -48,7 +49,7 @@ public class AbatedTest {
     }
 
     @Test
-    public void testSetClosedLoopEventStatus() {
+    void testSetClosedLoopEventStatus() {
         assertThatIllegalArgumentException()
             .isThrownBy(() -> new Abated().setClosedLoopEventStatus(ControlLoopEventStatus.ONSET));
     }
index 5aa7497..a2d18ab 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.time.Instant;
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class CanonicalAbatedTest {
+class CanonicalAbatedTest {
 
     @Test
-    public void testConstructors() {
+    void testConstructors() {
         CanonicalAbated abated1 = new CanonicalAbated(new VirtualControlLoopEvent());
         abated1.setRequestId(UUID.randomUUID());
         abated1.setClosedLoopAlarmStart(Instant.now());
index 23e1fff..01eaa3d 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.time.Instant;
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class CanonicalOnsetTest {
+class CanonicalOnsetTest {
 
     @Test
-    public void testConstructors() {
+    void testConstructors() {
         CanonicalOnset onset1 = new CanonicalOnset(new VirtualControlLoopEvent());
         onset1.setRequestId(UUID.randomUUID());
         onset1.setClosedLoopAlarmStart(Instant.now());
index f890cfc..7598e0e 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopEventStatusTest {
+class ControlLoopEventStatusTest {
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopEventStatus status = ControlLoopEventStatus.ABATED;
         assertEquals(ControlLoopEventStatus.ABATED, ControlLoopEventStatus.toStatus(status.toString()));
         assertNotEquals(ControlLoopEventStatus.ONSET, ControlLoopEventStatus.toStatus(status.toString()));
index 2def975..a1d619c 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopEventTest {
+class ControlLoopEventTest {
 
     private class TestControlLoopEvent extends ControlLoopEvent {
         private static final long serialVersionUID = 1L;
@@ -43,7 +43,7 @@ public class ControlLoopEventTest {
     }
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopEvent event = new TestControlLoopEvent();
 
         assertEquals("1.0.2", event.getVersion());
index 2ad0972..68c5bc2 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.util.Collections;
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.controlloop.util.Serialization;
 
-public class ControlLoopNotificationTest {
+class ControlLoopNotificationTest {
 
     private class TestControlLoopNotification extends ControlLoopNotification {
         private static final long serialVersionUID = 1L;
@@ -46,7 +46,7 @@ public class ControlLoopNotificationTest {
     }
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopNotification notification = new TestControlLoopNotification();
 
         assertEquals("1.0.2", notification.getVersion());
index a8330ba..0653985 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopNotificationTypeTest {
+class ControlLoopNotificationTypeTest {
 
     @Test
-    public void test() {
+    void test() {
 
         assertEquals(ControlLoopNotificationType.ACTIVE, ControlLoopNotificationType.toType("ACTIVE"));
         assertEquals(ControlLoopNotificationType.REJECTED, ControlLoopNotificationType.toType("REJECTED"));
index eaf4ea9..4770000 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopOperationTest {
+class ControlLoopOperationTest {
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopOperation operation = new ControlLoopOperation();
 
         assertEquals(operation, (Object) operation);
index 46fd9de..eaf7f5e 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopOperationWrapperTest {
+class ControlLoopOperationWrapperTest {
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopOperationWrapper wrapper = new ControlLoopOperationWrapper();
 
         assertNotNull(wrapper);
index b0f64eb..5fc4b35 100644 (file)
@@ -4,6 +4,7 @@
  * ================================================================================
  * Copyright (C) 2019 Wipro Limited Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ControlLoopResponseTest {
+class ControlLoopResponseTest {
 
     @Test
-    public void test() {
+    void test() {
         ControlLoopResponse rsp = new ControlLoopResponse();
 
         assertEquals("1.0.0", rsp.getVersion());
index 5dadff1..641af7e 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.policy.controlloop;
 
 import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class OnsetTest {
+class OnsetTest {
 
     @Test
-    public void testConstructors() {
+    void testConstructors() {
         VirtualControlLoopEvent event = new VirtualControlLoopEvent();
         event.setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
         event.setClosedLoopAlarmStart(Instant.now());
@@ -49,7 +50,7 @@ public class OnsetTest {
     }
 
     @Test
-    public void testSetClosedLoopEventStatus() {
+    void testSetClosedLoopEventStatus() {
         assertThatIllegalArgumentException()
             .isThrownBy(() -> new Onset().setClosedLoopEventStatus(ControlLoopEventStatus.ABATED));
     }
index 80f043e..88a8e43 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PhysicalControlLoopEventTest {
+class PhysicalControlLoopEventTest {
 
     @Test
-    public void test() {
+    void test() {
         PhysicalControlLoopEvent event = new PhysicalControlLoopEvent();
         assertNotNull(event);
 
index f52bbc9..8b4f89a 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PhysicalControlLoopNotificationTest {
+class PhysicalControlLoopNotificationTest {
 
     @Test
-    public void test() {
+    void test() {
         PhysicalControlLoopNotification notification = new PhysicalControlLoopNotification();
         assertNotNull(notification);
 
index 3fc7d13..78b1340 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VirtualControlLoopEventTest {
+class VirtualControlLoopEventTest {
 
     @Test
-    public void test() {
+    void test() {
         VirtualControlLoopEvent event = new VirtualControlLoopEvent();
 
         assertNotNull(event);
index 2ab6222..cf517e2 100644 (file)
@@ -3,7 +3,7 @@
  * controlloop
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.controlloop;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.time.Instant;
 import java.util.Collections;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VirtualControlLoopNotificationTest {
+class VirtualControlLoopNotificationTest {
 
     @Test
-    public void test() {
+    void test() {
         VirtualControlLoopNotification notification = new VirtualControlLoopNotification();
         assertNotNull(notification);
 
index 47bdb4c..9cc520f 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
   * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+  * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.guard;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Date;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class OperationsHistoryTest {
+class OperationsHistoryTest {
 
     @Test
-    public void test() {
+    void test() {
         OperationsHistory dao = new OperationsHistory();
 
         dao.setActor("my-actor");
index 8579bf1..23c9cea 100644 (file)
@@ -3,7 +3,7 @@
  * rest
  * ================================================================================
  * Copyright (C) 2018 Amdocs. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.rest;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class HttpDeleteWithBodyTest {
+class HttpDeleteWithBodyTest {
 
     private static final String NO_URI = "BlahBlah";
 
     @Test
-    public void testGetMethod() {
+    void testGetMethod() {
         HttpDeleteWithBody deleteWithBody = new HttpDeleteWithBody(NO_URI);
         assertEquals("DELETE", deleteWithBody.getMethod());
-        assertEquals(NO_URI, deleteWithBody.getURI().toString());
+        assertEquals(deleteWithBody.getURI().toString(), NO_URI);
     }
 }
\ No newline at end of file
index e6c8191..28136e6 100644 (file)
@@ -3,7 +3,7 @@
  * rest
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.rest;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import jakarta.ws.rs.Consumes;
 import jakarta.ws.rs.DELETE;
@@ -43,9 +44,9 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import org.apache.commons.lang3.tuple.Pair;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
 import org.onap.policy.common.utils.network.NetworkUtil;
@@ -79,7 +80,7 @@ public class RestTest {
     /**
      * Sets server endpoint for the tests.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception {
 
         port = NetworkUtil.allocPort();
@@ -105,39 +106,49 @@ public class RestTest {
      *
      * @throws Exception if there is a problem
      */
-    @AfterClass
+    @AfterAll
     public static void tearDown() throws Exception {
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test
     public void testGetUrlNull() {
         RestManager mgr = new RestManager();
-        mgr.get(null, "user", null, null);
+        assertThrows(NullPointerException.class, () -> {
+            mgr.get(null, "user", null, null);
+        });
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test
     public void testPutUrlNull() {
         RestManager mgr = new RestManager();
-        mgr.put(null, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
+        assertThrows(NullPointerException.class, () -> {
+            mgr.put(null, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
+        });
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test
     public void testPostUrlNull() {
         RestManager mgr = new RestManager();
-        mgr.post(null, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
+        assertThrows(NullPointerException.class, () -> {
+            mgr.post(null, "user", null, null, MediaType.TEXT_PLAIN, PAYLOAD);
+        });
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test
     public void testDeleteUrlNull() {
         RestManager mgr = new RestManager();
-        mgr.delete(null, "user", null, null, null, null);
+        assertThrows(NullPointerException.class, () -> {
+            mgr.delete(null, "user", null, null, null, null);
+        });
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test
     public void testPatchUrlNull() {
         RestManager mgr = new RestManager();
-        mgr.patch(null, "user", null, null, PAYLOAD);
+        assertThrows(NullPointerException.class, () -> {
+            mgr.patch(null, "user", null, null, PAYLOAD);
+        });
     }
 
     @Test
index 7b5ad46..3b5e9a4 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.sdnc.util.Serialization;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DemoTest {
+class DemoTest {
     private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
 
     @Test
-    public void test() {
+    void test() {
         SdncRequest request = new SdncRequest();
 
         request.setNsInstanceId("100");
index 8cd10eb..5a76346 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncHealAdditionalParamsTest {
+class SdncHealAdditionalParamsTest {
 
     @Test
-    public void testSdncHealAdditionalParameters() {
+    void testSdncHealAdditionalParameters() {
         SdncHealRequestHeaderInfo additionalParams = new SdncHealRequestHeaderInfo();
         assertNotNull(additionalParams);
         assertNotEquals(0, additionalParams.hashCode());
index 1412bbb..2bf0d13 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncHealRequestTest {
+class SdncHealRequestTest {
 
     @Test
-    public void testSdncHealRequest() {
+    void testSdncHealRequest() {
         SdncHealRequest request = new SdncHealRequest();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index 770feb4..251cb01 100644 (file)
@@ -3,7 +3,7 @@
  * sdnc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncHealServiceInfoTest {
+class SdncHealServiceInfoTest {
 
     @Test
-    public void testSdncHealServiceInfo() {
+    void testSdncHealServiceInfo() {
         SdncHealServiceInfo serviceInfo = new SdncHealServiceInfo();
         assertNotNull(serviceInfo);
         assertNotEquals(0, serviceInfo.hashCode());
index 6dc6fa2..4448baf 100644 (file)
@@ -3,7 +3,7 @@
  * sdnc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncRequestTest {
+class SdncRequestTest {
 
     @Test
-    public void testSdncRequest() {
+    void testSdncRequest() {
         SdncRequest request = new SdncRequest();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index a397bdc..c15428e 100644 (file)
@@ -3,7 +3,7 @@
  * sdnc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncResponseDescriptorTest {
+class SdncResponseDescriptorTest {
 
     @Test
-    public void testSdncResponseDescriptor() {
+    void testSdncResponseDescriptor() {
         SdncResponseOutput output = new SdncResponseOutput();
         assertNotNull(output);
         assertNotEquals(0, output.hashCode());
index b36a728..b054163 100644 (file)
@@ -3,7 +3,7 @@
  * sdnc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SdncResponseTest {
+class SdncResponseTest {
 
     @Test
-    public void testSdncResponse() {
+    void testSdncResponse() {
         SdncResponse response = new SdncResponse();
         assertNotNull(response);
         assertNotEquals(0, response.hashCode());
index 9dfb374..200c718 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Huawei. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnc.util;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SerializationTest {
+class SerializationTest {
 
     @Test
-    public void test() {
+    void test() {
         assertNotNull(Serialization.gsonPretty);
     }
 }
index 11f408a..1885ed1 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.time.Instant;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciCommonHeaderTest {
+class PciCommonHeaderTest {
 
     private static final String KANSAS = "Kansas";
     private static final String CAN_I_GO_HOME = "Can I go home?";
 
     @Test
-    public void testPciCommonHeader() {
+    void testPciCommonHeader() {
         PciCommonHeader commonHeader = new PciCommonHeader();
         assertNotNull(commonHeader);
         assertNotNull(new PciCommonHeader(commonHeader));
index d504dbb..1334fcc 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciRequestTest {
+class PciRequestTest {
 
     private static final String MODIFY = "Modify";
 
     @Test
-    public void testPciRequest() {
+    void testPciRequest() {
         PciRequest request = new PciRequest();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index e44800e..722c081 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 package org.onap.policy.sdnr;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciRequestWrapperTest {
+class PciRequestWrapperTest {
 
     @Test
-    public void testPciRequestWrapperWrapper() {
+    void testPciRequestWrapperWrapper() {
         assertNotNull(new PciRequestWrapper(new PciRequest()));
         PciRequestWrapper requestWrapper = new PciRequestWrapper();
         assertNotNull(requestWrapper);
index 7f10275..6cfd7a3 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciResponseCodeTest {
+class PciResponseCodeTest {
 
     @Test
-    public void testPciResponseCode() {
+    void testPciResponseCode() {
         assertNull(PciResponseCode.toResponseValue(0));
 
         assertEquals(PciResponseCode.ACCEPTED, PciResponseCode.toResponseValue(100));
index bd96e8e..70480b1 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciResponseTest {
+class PciResponseTest {
 
     Status status = new Status(0, "");
 
@@ -39,7 +39,7 @@ public class PciResponseTest {
 
 
     @Test
-    public void testHashCode() {
+    void testHashCode() {
         PciResponse response = new PciResponse();
         assertNotEquals(0, response.hashCode());
         response.setCommonHeader(new PciCommonHeader());
@@ -51,7 +51,7 @@ public class PciResponseTest {
     }
 
     @Test
-    public void testPciResponse() {
+    void testPciResponse() {
         PciResponse response = new PciResponse();
         assertNull(response.getCommonHeader());
         assertNull(response.getPayload());
@@ -59,13 +59,13 @@ public class PciResponseTest {
     }
 
     @Test
-    public void testToString() {
+    void testToString() {
         PciResponse response = new PciResponse();
         assertFalse(response.toString().isEmpty());
     }
 
     @Test
-    public void testEqualsObject() {
+    void testEqualsObject() {
         PciResponse response = new PciResponse();
         assertEquals(response, response);
         assertNotEquals(response, null);
@@ -107,7 +107,7 @@ public class PciResponseTest {
     }
 
     @Test
-    public void testResponseRequest() {
+    void testResponseRequest() {
         PciRequest request = new PciRequest();
         request.setCommonHeader(new PciCommonHeader());
         request.setPayload(requestPayload);
index eab0655..1b02473 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciResponseWrapperTest {
+class PciResponseWrapperTest {
 
     @Test
-    public void testPciResponseWrapperWrapper() {
+    void testPciResponseWrapperWrapper() {
 
         PciResponseWrapper responseWrapper = new PciResponseWrapper();
         assertNotNull(responseWrapper);
index f0b6ffb..e8f779e 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciStatusTest {
+class PciStatusTest {
 
     private static final String THE_WONDERFUL_LAND_OF_OZ = "The wonderful land of Oz";
 
     @Test
-    public void testResponseStatus() {
+    void testResponseStatus() {
         Status status = new Status();
         assertNotNull(status);
         assertNotEquals(0, status.hashCode());
index 708363b..8e915c3 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class PciWrapperTest {
+class PciWrapperTest {
 
     private static final String YELLOW_BRICK_ROAD = "YellowBrickRoad";
     private static final String TORNADO = "Tornado";
@@ -38,7 +38,7 @@ public class PciWrapperTest {
     private static final String VERSION_19 = "19.3.9";
 
     @Test
-    public void testPciWrapper() {
+    void testPciWrapper() {
         PciWrapper wrapper = new PciWrapper();
         assertNotNull(wrapper);
         assertNotEquals(0, wrapper.hashCode());
index c840848..3fd2cfd 100644 (file)
 
 package org.onap.policy.sdnr;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.sdnr.util.Serialization;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class SdnrTest {
+class SdnrTest {
 
     private static final String CORRELATION_ID = "664be3d2-6c12-4f4b-a3e7-c349acced200";
 
@@ -81,7 +81,7 @@ public class SdnrTest {
     }
 
     @Test
-    public void testRequestSerialization() {
+    void testRequestSerialization() {
 
         /*
          * Use the gson serializer to obtain json
@@ -110,7 +110,7 @@ public class SdnrTest {
     }
 
     @Test
-    public void testRequestDeserialization() {
+    void testRequestDeserialization() {
 
         /*
          * Convert the PCI request object into json so we have a string of json to use for testing
@@ -151,7 +151,7 @@ public class SdnrTest {
     }
 
     @Test
-    public void testResponseSerialization() {
+    void testResponseSerialization() {
 
         /*
          * Use the serializer to convert the object into json
@@ -176,7 +176,7 @@ public class SdnrTest {
     }
 
     @Test
-    public void testResponseDeserialization() {
+    void testResponseDeserialization() {
         /*
          * Convert the PCI response object into json so we have a string of json to use for testing
          */
index ca2ca05..0e733a6 100644 (file)
@@ -3,7 +3,7 @@
  * sdnr
  * ================================================================================
  * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.sdnr.util;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.time.Instant;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SerializationTest {
+class SerializationTest {
 
     @Test
-    public void test() {
+    void test() {
         String nameString = "Dorothy";
         String jsonName = Serialization.gsonPretty.toJson(nameString, String.class);
         assertEquals("\"Dorothy\"", jsonName);
index e45ee0a..3295b8a 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.HashMap;
 import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.so.util.Serialization;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DemoTest {
+class DemoTest {
     private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
 
     @Test
-    public void test() {
+    void test() {
 
         SoRequest request = new SoRequest();
         request.setRequestDetails(new SoRequestDetails());
@@ -108,7 +108,7 @@ public class DemoTest {
     }
 
     @Test
-    public void testHack() {
+    void testHack() {
 
         logger.debug("**  HACK  **");
 
index 4aa2db3..e868789 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  *
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.time.LocalDateTime;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoAsyncRequestStatusTest {
+class SoAsyncRequestStatusTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
 
         assertNull(obj.getCorrelator());
@@ -44,7 +44,7 @@ public class SoAsyncRequestStatusTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
 
         obj.setCorrelator("correlator");
index 59626f4..f54d41a 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  *
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoCloudConfigurationTest {
+class SoCloudConfigurationTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoCloudConfiguration obj = new SoCloudConfiguration();
 
         assertNull(obj.getLcpCloudRegionId());
@@ -38,7 +38,7 @@ public class SoCloudConfigurationTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoCloudConfiguration obj = new SoCloudConfiguration();
 
         obj.setLcpCloudRegionId("lcpCloudRegionId");
index bb7e851..850d543 100644 (file)
@@ -34,7 +34,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 @Path("/SO")
-public class SoDummyServer {
+class SoDummyServer {
 
     private static final String ONGOING = "ONGOING";
     private static int postMessagesReceived = 0;
index b8e01c6..374e472 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoInstanceReferencesTest {
+class SoInstanceReferencesTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoInstanceReferences obj = new SoInstanceReferences();
 
         assertNull(obj.getInstanceId());
@@ -37,7 +37,7 @@ public class SoInstanceReferencesTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoInstanceReferences obj = new SoInstanceReferences();
 
         obj.setInstanceId("instanceId");
index a9f5baa..09bbc12 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  *
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoModelInfoTest {
+class SoModelInfoTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoModelInfo obj = new SoModelInfo();
 
         assertNull(obj.getModelCustomizationId());
@@ -43,7 +43,7 @@ public class SoModelInfoTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoModelInfo obj = new SoModelInfo();
 
         obj.setModelCustomizationId("modelCustomizationId");
index e6fc8fe..3bc6f3d 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoPolicyExceptionHolderTest {
+class SoPolicyExceptionHolderTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
 
         assertNull(obj.getMessageId());
@@ -37,7 +37,7 @@ public class SoPolicyExceptionHolderTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
 
         obj.setMessageId("messageId");
index b6c2e06..d493abe 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  *
  * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRelatedInstanceListElementTest {
+class SoRelatedInstanceListElementTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
 
         assertNull(obj.getRelatedInstance());
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
 
         SoRelatedInstance relatedInstance = new SoRelatedInstance();
index f215d01..7be7352 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRelatedInstanceTest {
+class SoRelatedInstanceTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRelatedInstance obj = new SoRelatedInstance();
 
         assertNull(obj.getInstanceId());
@@ -38,7 +38,7 @@ public class SoRelatedInstanceTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRelatedInstance obj = new SoRelatedInstance();
 
         obj.setInstanceId("instanceId");
index a736912..834d8a8 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 Wipro Limited.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,12 +29,12 @@ import com.openpojo.validation.rule.impl.GetterMustExistRule;
 import com.openpojo.validation.rule.impl.SetterMustExistRule;
 import com.openpojo.validation.test.impl.GetterTester;
 import com.openpojo.validation.test.impl.SetterTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequest3gppTest {
+class SoRequest3gppTest {
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         PojoClass pojoClass = PojoClassFactory.getPojoClass(SoRequest3gpp.class);
         Validator validator = ValidatorBuilder
                 .create()
index 3d31686..8c7de50 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2022 CTC Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,12 +29,12 @@ import com.openpojo.validation.rule.impl.GetterMustExistRule;
 import com.openpojo.validation.rule.impl.SetterMustExistRule;
 import com.openpojo.validation.test.impl.GetterTester;
 import com.openpojo.validation.test.impl.SetterTester;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestCllTest {
+class SoRequestCllTest {
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         PojoClass pojoClass = PojoClassFactory.getPojoClass(SoRequestCll.class);
         Validator validator = ValidatorBuilder
                 .create()
index 4866f3b..98a8289 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
  * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.function.BiConsumer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestDetailsTest {
+class SoRequestDetailsTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestDetails obj = new SoRequestDetails();
 
         assertNull(obj.getCloudConfiguration());
@@ -49,7 +49,7 @@ public class SoRequestDetailsTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestDetails obj = new SoRequestDetails();
 
         SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
@@ -74,7 +74,7 @@ public class SoRequestDetailsTest {
     }
 
     @Test
-    public void testSoMRequestDetailsMethods() {
+    void testSoMRequestDetailsMethods() {
         SoRequestDetails details = new SoRequestDetails();
         assertNotNull(details);
         assertNotEquals(0, details.hashCode());
index f70e598..265bb90 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestErrorTest {
+class SoRequestErrorTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestError obj = new SoRequestError();
 
         assertNull(obj.getPolicyException());
@@ -38,7 +38,7 @@ public class SoRequestErrorTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestError obj = new SoRequestError();
 
         SoPolicyExceptionHolder policyException = new SoPolicyExceptionHolder();
index dd7db84..8bc4202 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestInfoTest {
+class SoRequestInfoTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestInfo obj = new SoRequestInfo();
 
         assertNull(obj.getBillingAccountNumber());
@@ -46,7 +46,7 @@ public class SoRequestInfoTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestInfo obj = new SoRequestInfo();
 
         obj.setBillingAccountNumber("billingAccountNumber");
index 563e28d..0159c8e 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestParametersTest {
+class SoRequestParametersTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestParameters obj = new SoRequestParameters();
 
         assertNull(obj.getSubscriptionServiceType());
@@ -39,7 +39,7 @@ public class SoRequestParametersTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestParameters obj = new SoRequestParameters();
 
         obj.setSubscriptionServiceType("subscriptionServiceType");
index 83172de..43e3eb9 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestReferencesTest {
+class SoRequestReferencesTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestReferences obj = new SoRequestReferences();
 
         assertNull(obj.getInstanceId());
@@ -37,7 +37,7 @@ public class SoRequestReferencesTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestReferences obj = new SoRequestReferences();
 
         obj.setInstanceId("instanceId");
index 2b0c572..3b57daa 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestStatusTest {
+class SoRequestStatusTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequestStatus obj = new SoRequestStatus();
 
         assertEquals(0, obj.getPercentProgress());
@@ -41,7 +41,7 @@ public class SoRequestStatusTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequestStatus obj = new SoRequestStatus();
 
         obj.setPercentProgress(2008);
index 9590164..6951a80 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.time.LocalDateTime;
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoRequestTest {
+class SoRequestTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoRequest obj = new SoRequest();
 
         assertNull(obj.getFinishTime());
@@ -44,7 +44,7 @@ public class SoRequestTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoRequest obj = new SoRequest();
 
         LocalDateTime finishTime = LocalDateTime.now();
index c75aa9e..c269106 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoResponseTest {
+class SoResponseTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoResponse obj = new SoResponse();
 
         assertEquals(0, obj.getHttpResponseCode());
@@ -39,7 +39,7 @@ public class SoResponseTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoResponse obj = new SoResponse();
 
         obj.setHttpResponseCode(2008);
index 42f57c7..f33bfd7 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoResponseWrapperTest {
+class SoResponseWrapperTest {
 
     private static final String REQ_ID = "reqID";
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoResponse response = new SoResponse();
         SoResponseWrapper obj = new SoResponseWrapper(response, REQ_ID);
 
@@ -42,7 +42,7 @@ public class SoResponseWrapperTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoResponse response = new SoResponse();
         SoResponseWrapper obj = new SoResponseWrapper(response, REQ_ID);
 
@@ -56,7 +56,7 @@ public class SoResponseWrapperTest {
     }
 
     @Test
-    public void testSoResponseWrapperMethods() {
+    void testSoResponseWrapperMethods() {
         String requestId = UUID.randomUUID().toString();
         SoResponse response = new SoResponse();
 
index 981db65..ac94dd2 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoServiceExceptionHolderTest {
+class SoServiceExceptionHolderTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
 
         assertNull(obj.getMessageId());
@@ -40,7 +40,7 @@ public class SoServiceExceptionHolderTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
 
         obj.setMessageId("messageId");
index 56278b0..fa2a890 100644 (file)
@@ -3,7 +3,7 @@
  * so
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.so;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SoSubscriberInfoTest {
+class SoSubscriberInfoTest {
 
     @Test
-    public void testConstructor() {
+    void testConstructor() {
         SoSubscriberInfo obj = new SoSubscriberInfo();
 
         assertNull(obj.getGlobalSubscriberId());
@@ -38,7 +38,7 @@ public class SoSubscriberInfoTest {
     }
 
     @Test
-    public void testSetGet() {
+    void testSetGet() {
         SoSubscriberInfo obj = new SoSubscriberInfo();
 
         obj.setGlobalSubscriberId("globalSubscriberId");
index f66e9ec..4b23e40 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2017-2019 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2020 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.LinkedList;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.vfc.util.Serialization;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DemoTest {
+class DemoTest {
     private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
 
     @Test
-    public void test() {
+    void test() {
         VfcRequest request = new VfcRequest();
 
         request.setNsInstanceId("100");
index 49dd06e..f06874b 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcHealActionVmInfoTest {
+class VfcHealActionVmInfoTest {
 
     @Test
-    public void testVfcHealActionVmInfo() {
+    void testVfcHealActionVmInfo() {
         VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
         assertNotNull(actionInfo);
         assertNotEquals(0, actionInfo.hashCode());
index acaad20..622f94b 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcHealAdditionalParamsTest {
+class VfcHealAdditionalParamsTest {
 
     @Test
-    public void testVfcHealAdditionalParameters() {
+    void testVfcHealAdditionalParameters() {
         VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
         assertNotNull(additionalParams);
         assertNotEquals(0, additionalParams.hashCode());
index a4fc659..5708173 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcHealRequestTest {
+class VfcHealRequestTest {
 
     @Test
-    public void testVfcHealRequest() {
+    void testVfcHealRequest() {
         VfcHealRequest request = new VfcHealRequest();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index ec222e9..fe16a93 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcRequestTest {
+class VfcRequestTest {
 
     @Test
-    public void testVfcRequest() {
+    void testVfcRequest() {
         VfcRequest request = new VfcRequest();
         assertNotNull(request);
         assertNotEquals(0, request.hashCode());
index e85502d..d88d593 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcResponseDescriptorTest {
+class VfcResponseDescriptorTest {
 
     @Test
-    public void testVfcResponseDescriptor() {
+    void testVfcResponseDescriptor() {
         VfcResponseDescriptor descriptor = new VfcResponseDescriptor();
         assertNotNull(descriptor);
         assertNotEquals(0, descriptor.hashCode());
index 196ae2f..4e1c9a1 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018-2019 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class VfcResponseTest {
+class VfcResponseTest {
 
     @Test
-    public void testVfcResponse() {
+    void testVfcResponse() {
         VfcResponse response = new VfcResponse();
         assertNotNull(response);
         assertNotEquals(0, response.hashCode());
index 983760a..4d31d75 100644 (file)
@@ -3,7 +3,7 @@
  * vfc
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
  * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 package org.onap.policy.vfc.util;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SerializationTest {
+class SerializationTest {
 
     @Test
-    public void test() {
+    void test() {
         assertNotNull(Serialization.gsonPretty);
     }
 }