summaryrefslogtreecommitdiffstats
path: root/models-interactions
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions')
-rw-r--r--models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/A1pOperationTest.java2
-rw-r--r--models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java2
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java8
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java6
-rw-r--r--models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java2
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java2
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java6
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java6
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java2
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java4
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java1
-rw-r--r--models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java9
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyCllTest.java2
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java2
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java4
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java2
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java6
-rw-r--r--models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java3
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java3
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java6
-rw-r--r--models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java8
-rw-r--r--models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcOperationTest.java1
-rw-r--r--models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java2
-rw-r--r--models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java3
-rw-r--r--models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/XacmlActorTest.java1
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java1
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java10
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java8
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java4
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperationTest.java2
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperatorTest.java1
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java10
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/PipelineControllerFutureTest.java18
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/ForwarderTest.java1
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java5
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java11
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java2
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java2
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java2
-rw-r--r--models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java2
-rw-r--r--models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java4
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java4
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java4
-rw-r--r--models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java2
-rw-r--r--models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java2
-rw-r--r--models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java3
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java6
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java2
-rw-r--r--models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java2
-rw-r--r--models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java2
-rw-r--r--models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java2
61 files changed, 103 insertions, 132 deletions
diff --git a/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/A1pOperationTest.java b/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/A1pOperationTest.java
index 930888da2..7ab5d475d 100644
--- a/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/A1pOperationTest.java
+++ b/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/A1pOperationTest.java
@@ -59,7 +59,7 @@ import org.onap.policy.sdnr.util.StatusCodeEnum;
*/
@BeforeEach
@Override
- void setUp() throws Exception {
+ void setUp() {
super.setUp();
operation = new A1pOperation(params, config);
diff --git a/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java b/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java
index 3620b0cef..6a254a4f1 100644
--- a/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java
+++ b/models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java
@@ -69,7 +69,7 @@ public abstract class BasicA1pOperation extends BasicBidirectionalTopicOperation
/**
* Initializes mocks and sets up.
*/
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
response = new PciMessage();
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
index 8768aec7b..7a101cb8d 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -82,7 +82,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
oper = new AaiCustomQueryOperation(params, config);
@@ -166,7 +166,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation {
}
@Test
- void testGetVserverLink() throws Exception {
+ void testGetVserverLink() {
oper.setProperty(OperationProperties.AAI_VSERVER_LINK, MY_LINK);
assertEquals(MY_LINK, oper.getVserverLink());
}
@@ -194,7 +194,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation {
private OperationResult getResult(CompletableFuture<OperationOutcome> future2)
- throws InterruptedException, ExecutionException, TimeoutException {
+ throws InterruptedException, ExecutionException {
executor.runAll(100);
assertTrue(future2.isDone());
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java
index e9890b748..831edcc70 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -66,7 +66,7 @@ class AaiGetOperationTest extends BasicAaiOperation {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
oper = new AaiGetOperation(params, config);
}
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
index cf2bb1b62..bed847a10 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -75,7 +75,7 @@ class AaiGetPnfOperationTest extends BasicAaiOperation {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
oper = new AaiGetPnfOperation(params, config);
oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
@@ -174,7 +174,7 @@ class AaiGetPnfOperationTest extends BasicAaiOperation {
* Tests startOperationAsync() when a property is missing.
*/
@Test
- void testStartOperationAsyncMissingProperty() throws Exception {
+ void testStartOperationAsyncMissingProperty() {
oper = new AaiGetPnfOperation(params, config);
oper.generateSubRequestId(1);
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
index 65d3fe831..e3beb52ac 100644
--- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
+++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java
@@ -75,7 +75,7 @@ class AaiGetTenantOperationTest extends BasicAaiOperation {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
oper = new AaiGetTenantOperation(params, config);
oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
@@ -174,7 +174,7 @@ class AaiGetTenantOperationTest extends BasicAaiOperation {
* Tests startOperationAsync() when a property is missing.
*/
@Test
- void testStartOperationAsyncMissingProperty() throws Exception {
+ void testStartOperationAsyncMissingProperty() {
oper = new AaiGetTenantOperation(params, config);
oper.generateSubRequestId(1);
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
index caa190f71..94efe0af3 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java
@@ -66,7 +66,7 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOp
*/
@BeforeEach
@Override
- void setUp() throws Exception {
+ void setUp() {
super.setUp();
oper = new MyOper(params, config);
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
index b934d8659..45d64db34 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
@@ -86,7 +86,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
/**
* Initializes mocks and sets up.
*/
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
response = new Response();
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
index fad504434..2e0926e12 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperationTest.java
@@ -62,7 +62,7 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.Bidirectional
@BeforeEach
@Override
- void setUp() throws Exception {
+ void setUp() {
super.setUp();
oper = new ModifyConfigOperation(params, config);
@@ -90,8 +90,6 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.Bidirectional
oper.setProperty(OperationProperties.AAI_RESOURCE_VNF, genvnf);
outcome = oper.start().get();
- // assertEquals(OperationResult.SUCCESS, outcome.getResult());
- // assertTrue(outcome.getResponse() instanceof Response);
assertNotNull(outcome);
}
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
index 8fa165f6f..53677c766 100644
--- a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
@@ -126,8 +126,6 @@ import org.onap.policy.simulators.TopicServer;
oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY);
outcome = oper.start().get();
- // assertEquals(OperationResult.SUCCESS, outcome.getResult());
- // assertTrue(outcome.getResponse() instanceof AppcLcmMessageWrapper);
assertNotNull(outcome);
}
@@ -167,7 +165,7 @@ import org.onap.policy.simulators.TopicServer;
* Tests makeRequest() when a property is missing.
*/
@Test
- void testMakeRequestMissingProperty() throws Exception {
+ void testMakeRequestMissingProperty() {
oper = new AppcLcmOperation(params, config);
oper.generateSubRequestId(1);
diff --git a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java
index dc7fcf447..e3ad6bea4 100644
--- a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java
+++ b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java
@@ -51,7 +51,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
* Sets up the fields.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
future = new CompletableFuture<>();
manager = new CdsActorServiceManager(new OperationOutcome(), future);
}
@@ -68,7 +68,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
}
@Test
- void testOnMessageProcessing() throws InterruptedException, ExecutionException, TimeoutException {
+ void testOnMessageProcessing() {
Status status = Status.newBuilder().setEventType(EventType.EVENT_COMPONENT_PROCESSING).build();
output = ExecutionServiceOutput.newBuilder().setStatus(status).build();
@@ -89,7 +89,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
}
@Test
- void testOnError() throws InterruptedException, ExecutionException, TimeoutException {
+ void testOnError() {
Exception exception = new Exception("something failed");
manager.onError(exception);
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java
index 3510c4a67..09ca68434 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BandwidthOnDemandOperationTest.java
@@ -129,7 +129,7 @@ class BandwidthOnDemandOperationTest extends BasicSdncOperation {
*/
@Test
- void testMakeRequestMissingBandwidth() throws Exception {
+ void testMakeRequestMissingBandwidth() {
oper = new BandwidthOnDemandOperation(params, config);
oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH_CHANGE_TIME, MY_CHANGE_TIME);
@@ -143,7 +143,7 @@ class BandwidthOnDemandOperationTest extends BasicSdncOperation {
}
@Test
- void testMakeRequestMissingBandwidthChangeTime() throws Exception {
+ void testMakeRequestMissingBandwidthChangeTime() {
oper = new BandwidthOnDemandOperation(params, config);
oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH, MY_BANDWIDTH);
@@ -157,7 +157,7 @@ class BandwidthOnDemandOperationTest extends BasicSdncOperation {
}
@Test
- void testMakeRequestMissingVnfId() throws Exception {
+ void testMakeRequestMissingVnfId() {
oper = new BandwidthOnDemandOperation(params, config);
oper.setProperty(OperationProperties.ENRICHMENT_SERVICE_ID, MY_SERVICE);
oper.setProperty(OperationProperties.ENRICHMENT_BANDWIDTH, MY_BANDWIDTH);
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
index cfdec987d..5dee02fcb 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
@@ -112,7 +112,7 @@ abstract class BasicSdncOperation extends BasicHttpOperation {
* @return the request that was posted
*/
protected SdncRequest verifyOperation(SdncOperation operation)
- throws InterruptedException, ExecutionException, TimeoutException, CoderException {
+ throws InterruptedException, ExecutionException, CoderException {
CompletableFuture<OperationOutcome> future2 = operation.start();
executor.runAll(100);
diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java
index ee9a3a1f2..bd67f7fec 100644
--- a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java
+++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java
@@ -70,7 +70,7 @@ abstract class BasicSdnrOperation extends BasicBidirectionalTopicOperation<PciMe
/**
* Initializes mocks and sets up.
*/
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
response = new PciMessage();
@@ -102,7 +102,7 @@ abstract class BasicSdnrOperation extends BasicBidirectionalTopicOperation<PciMe
* @param operation operation to run
*/
protected void verifyOperation(SdnrOperation operation)
- throws InterruptedException, ExecutionException, TimeoutException {
+ throws InterruptedException, ExecutionException {
CompletableFuture<OperationOutcome> future2 = operation.start();
executor.runAll(100);
diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java
index e16ad1177..f7dd9b935 100644
--- a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java
+++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java
@@ -66,7 +66,7 @@ import org.onap.policy.sdnr.util.StatusCodeEnum;
*/
@BeforeEach
@Override
- void setUp() throws Exception {
+ void setUp() {
super.setUp();
operation = new SdnrOperation(params, config);
@@ -148,8 +148,6 @@ import org.onap.policy.sdnr.util.StatusCodeEnum;
operation.setProperty(OperationProperties.EVENT_PAYLOAD, "my payload");
outcome = operation.start().get();
- // assertEquals(OperationResult.SUCCESS, outcome.getResult());
- // assertTrue(outcome.getResponse() instanceof PciMessage);
assertNotNull(outcome);
}
diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java
index 129305d99..57c3f7ee2 100644
--- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java
+++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/RestManagerResponse.java
@@ -46,7 +46,6 @@ import org.onap.policy.common.utils.coder.CoderException;
*/
@AllArgsConstructor
public class RestManagerResponse extends Response {
- // TODO move to actorServices
@Getter
private final int status;
diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java
index 8076fbcb9..4ef0a7ba9 100644
--- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java
+++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Wipro Limited.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -121,7 +121,6 @@ public class VfModuleDelete extends SoOperation {
*/
protected CompletableFuture<Response> delete(String uri, Map<String, Object> headers, String contentType,
String request, InvocationCallback<Response> callback) {
- // TODO move to HttpOperation
final String url = getClient().getBaseUrl() + uri;
@@ -163,7 +162,6 @@ public class VfModuleDelete extends SoOperation {
* @return the builder
*/
protected Builder addAuthHeader(Builder builder) {
- // TODO move to HttpOperation
final HttpClient client = getClient();
String username = client.getUserName();
if (StringUtils.isBlank(username)) {
@@ -229,11 +227,6 @@ public class VfModuleDelete extends SoOperation {
// requestInfo
details.setRequestInfo(constructRequestInfo());
- /*
- * TODO the legacy SO code always passes null for the last argument, though it
- * should be passing the vfModuleInstanceId
- */
-
// compute the path
String svcId = getRequiredText("service instance ID", vnfServiceItem.getServiceInstanceId());
String path = PATH_PREFIX + svcId + "/vnfs/" + vnfItem.getVnfId() + "/vfModules/null";
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyCllTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyCllTest.java
index ff1a93b85..0edc7d374 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyCllTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyCllTest.java
@@ -110,7 +110,7 @@ class ModifyCllTest extends BasicSoOperation {
* Tests makeRequest() when a property is missing.
*/
@Test
- void testMakeRequestMissingProperty() throws Exception {
+ void testMakeRequestMissingProperty() {
oper = new ModifyCll(params, config);
assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest())
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
index c5c183275..4db3ca308 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
@@ -110,7 +110,7 @@ class ModifyNssiTest extends BasicSoOperation {
* Tests makeRequest() when a property is missing.
*/
@Test
- void testMakeRequestMissingProperty() throws Exception {
+ void testMakeRequestMissingProperty() {
oper = new ModifyNssi(params, config);
assertThatIllegalStateException().isThrownBy(() -> oper.makeRequest())
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java
index fe88a2371..f04708210 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java
@@ -212,7 +212,7 @@ import org.onap.policy.so.SoResponse;
}
@Test
- void testConstructCloudConfiguration() throws Exception {
+ void testConstructCloudConfiguration() {
Tenant tenantItem = new Tenant();
tenantItem.setTenantId("my-tenant-id");
@@ -235,7 +235,7 @@ import org.onap.policy.so.SoResponse;
}
@Test
- void testGetRequiredText() throws Exception {
+ void testGetRequiredText() {
assertThatCode(() -> oper.getRequiredText("some value", "my value")).doesNotThrowAnyException();
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
index 721cb6a6d..d1b2c0747 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
@@ -221,7 +221,7 @@ class VfModuleCreateTest extends BasicSoOperation {
* Tests makeRequest() when a property is missing.
*/
@Test
- void testMakeRequestMissingProperty() throws Exception {
+ void testMakeRequestMissingProperty() {
loadProperties();
ServiceInstance instance = new ServiceInstance();
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
index 5ece1968d..208db3f57 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
@@ -277,7 +277,7 @@ class VfModuleDeleteTest extends BasicSoOperation {
*/
@Test
@SuppressWarnings("unchecked")
- void testDeleteException() throws Exception {
+ void testDeleteException() {
Throwable thrown = new IllegalStateException(EXPECTED_EXCEPTION);
// need a new future, with an exception
@@ -360,7 +360,7 @@ class VfModuleDeleteTest extends BasicSoOperation {
* Tests makeRequest() when a property is missing.
*/
@Test
- void testMakeRequestMissingProperty() throws Exception {
+ void testMakeRequestMissingProperty() {
loadProperties();
ServiceInstance instance = new ServiceInstance();
@@ -381,7 +381,7 @@ class VfModuleDeleteTest extends BasicSoOperation {
}
@SuppressWarnings("unchecked")
- private void configureResponse(String responseText) throws CoderException {
+ private void configureResponse(String responseText) {
// indicate that the response was completed
lenient().when(javaResp.statusCode()).thenReturn(200);
lenient().when(javaResp.body()).thenReturn(responseText);
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java
index 48ee9dcfc..4727de010 100644
--- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java
+++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicOperation.java
@@ -24,6 +24,7 @@ package org.onap.policy.controlloop.actor.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import jakarta.ws.rs.core.Response;
+import java.util.Collections;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -122,7 +123,7 @@ public class BasicOperation {
* @return payload data
*/
protected Map<String, Object> makePayload() {
- return null;
+ return Collections.emptyMap();
}
/**
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
index c795f9cc5..0d04e5894 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
@@ -37,7 +37,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
@@ -71,7 +70,7 @@ class BasicBidirectionalTopicOperationTest {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
oper.setUpBasic();
}
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
index 58392b96e..907802963 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicHttpOperationTest.java
@@ -43,7 +43,7 @@ class BasicHttpOperationTest {
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
oper = new BasicHttpOperation(ACTOR, OPERATION);
oper.setUpBasic();
}
@@ -62,7 +62,7 @@ class BasicHttpOperationTest {
}
@Test
- void testSetUp() throws Exception {
+ void testSetUp() {
assertNotNull(oper.client);
assertSame(oper.client, oper.factory.get(BasicHttpOperation.MY_CLIENT));
assertEquals(200, oper.rawResponse.getStatus());
@@ -73,7 +73,7 @@ class BasicHttpOperationTest {
}
@Test
- void testInitOperator() throws Exception {
+ void testInitOperator() {
oper.initConfig();
assertSame(oper.client, oper.config.getClient());
diff --git a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
index b2afce2c3..cf61e191b 100644
--- a/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
+++ b/models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicOperationTest.java
@@ -23,9 +23,9 @@ package org.onap.policy.controlloop.actor.test;
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.junit.jupiter.api.Assertions.assertSame;
+import java.util.Collections;
import java.util.Map;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -44,7 +44,7 @@ import org.onap.policy.controlloop.actorserviceprovider.Util;
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
oper = new BasicHttpOperation(ACTOR, OPERATION);
oper.setUpBasic();
}
@@ -63,7 +63,7 @@ import org.onap.policy.controlloop.actorserviceprovider.Util;
}
@Test
- void testSetUp() throws Exception {
+ void testSetUp() {
assertNotNull(oper.future);
assertNotNull(oper.outcome);
assertNotNull(oper.executor);
@@ -82,7 +82,7 @@ import org.onap.policy.controlloop.actorserviceprovider.Util;
@Test
void testMakePayload() {
- assertNull(oper.makePayload());
+ assertEquals(Collections.emptyMap(), oper.makePayload());
}
@Test
diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcOperationTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcOperationTest.java
index 920e79984..e0fd18b08 100644
--- a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcOperationTest.java
+++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcOperationTest.java
@@ -76,7 +76,6 @@ import org.onap.policy.vfc.VfcResponseDescriptor;
VfcResponseDescriptor mockDescriptor = Mockito.mock(VfcResponseDescriptor.class);
Mockito.when(mockResponse.getResponseDescriptor()).thenReturn(mockDescriptor);
- // TODO use actual request state value
Mockito.when(mockDescriptor.getStatus()).thenReturn("COMPLETE");
assertNotNull(oper.getRequestState(mockResponse));
}
diff --git a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java
index ee9d28c57..fa81836f3 100644
--- a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java
+++ b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java
@@ -94,7 +94,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
guardConfig = mock(DecisionConfig.class);
diff --git a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java
index a4187b523..f8b53e8f8 100644
--- a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java
+++ b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java
@@ -28,7 +28,6 @@ import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import java.util.Map;
import java.util.TreeMap;
@@ -86,7 +85,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
super.setUpBasic();
guardConfig = mock(DecisionConfig.class);
diff --git a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/XacmlActorTest.java b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/XacmlActorTest.java
index 3f0e52860..81c946419 100644
--- a/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/XacmlActorTest.java
+++ b/models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/XacmlActorTest.java
@@ -23,7 +23,6 @@ package org.onap.policy.controlloop.actor.xacml;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import java.util.stream.Collectors;
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
index 5765f35ba..8f2199f05 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
@@ -95,7 +95,6 @@ public abstract class BidirectionalTopicOperation<Q, S> extends OperationPartial
*/
@Override
protected long getTimeoutMs(Integer timeoutSec) {
- // TODO move this method to the superclass
return (timeoutSec == null || timeoutSec == 0 ? getTimeoutMs() : super.getTimeoutMs(timeoutSec));
}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java
index 5ecebd668..7e4543eca 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java
@@ -98,7 +98,7 @@ class BidirectionalTopicActorTest {
}
@Test
- void testDoStart() throws BidirectionalTopicClientException {
+ void testDoStart() {
// allocate some handlers
actor.getTopicHandler(MY_SINK, MY_SOURCE1);
actor.getTopicHandler(MY_SINK, MY_SOURCE2);
@@ -117,7 +117,7 @@ class BidirectionalTopicActorTest {
}
@Test
- void testDoStop() throws BidirectionalTopicClientException {
+ void testDoStop() {
// allocate some handlers
actor.getTopicHandler(MY_SINK, MY_SOURCE1);
actor.getTopicHandler(MY_SINK, MY_SOURCE2);
@@ -136,7 +136,7 @@ class BidirectionalTopicActorTest {
}
@Test
- void testDoShutdown() throws BidirectionalTopicClientException {
+ void testDoShutdown() {
// allocate some handlers
actor.getTopicHandler(MY_SINK, MY_SOURCE1);
@@ -187,7 +187,7 @@ class BidirectionalTopicActorTest {
}
@Test
- void testGetTopicHandler() throws BidirectionalTopicClientException {
+ void testGetTopicHandler() {
assertSame(handler1, actor.getTopicHandler(MY_SINK, MY_SOURCE1));
assertSame(handler2, actor.getTopicHandler(MY_SINK, MY_SOURCE2));
@@ -195,7 +195,7 @@ class BidirectionalTopicActorTest {
}
@Test
- void testMakeTopicHandler() throws BidirectionalTopicClientException {
+ void testMakeTopicHandler() {
// use a real actor
actor = new BidirectionalTopicActor<>(ACTOR, BidirectionalTopicActorParams.class);
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
index 1fc8cc18e..67283f5d4 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
@@ -174,7 +174,7 @@ class BidirectionalTopicOperationTest {
* Tests startOperationAsync() when processResponse() throws an exception.
*/
@Test
- void testStartOperationAsyncProcException() throws Exception {
+ void testStartOperationAsyncProcException() {
oper = new MyOperation(params, config) {
@Override
protected OperationOutcome processResponse(OperationOutcome outcome, String rawResponse,
@@ -202,7 +202,7 @@ class BidirectionalTopicOperationTest {
* Tests startOperationAsync() when the publisher throws an exception.
*/
@Test
- void testStartOperationAsyncPubException() throws Exception {
+ void testStartOperationAsyncPubException() {
// indicate that nothing was published
when(handler.send(any())).thenReturn(false);
@@ -302,7 +302,7 @@ class BidirectionalTopicOperationTest {
* Tests processResponse() when the decoder succeeds.
*/
@Test
- void testProcessResponseDecodeOk() throws CoderException {
+ void testProcessResponseDecodeOk() {
assertSame(outcome, oper.processResponse(outcome, responseText, stdResponse));
assertEquals(OperationResult.SUCCESS, outcome.getResult());
assertEquals(response, outcome.getResponse());
@@ -312,7 +312,7 @@ class BidirectionalTopicOperationTest {
* Tests processResponse() when the decoder throws an exception.
*/
@Test
- void testProcessResponseDecodeExcept() throws CoderException {
+ void testProcessResponseDecodeExcept() {
assertThatIllegalArgumentException().isThrownBy(
() -> oper.processResponse(outcome, "{invalid json", stdResponse));
}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java
index 9813d1b7a..8e1a8783a 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java
@@ -260,7 +260,7 @@ class HttpOperationTest {
* Tests handleResponse() when it fails.
*/
@Test
- void testHandleResponseFailed() throws Exception {
+ void testHandleResponseFailed() {
CompletableFuture<OperationOutcome> future2 = oper.handleResponse(outcome, PATH, cb -> {
callback.set(cb);
return future;
@@ -322,7 +322,7 @@ class HttpOperationTest {
* Tests processResponse() when the decoder throws an exception.
*/
@Test
- void testProcessResponseDecodeExcept() throws CoderException {
+ void testProcessResponseDecodeExcept() {
MyGetOperation<Integer> oper2 = new MyGetOperation<>(Integer.class);
assertThatIllegalArgumentException().isThrownBy(() -> oper2.processResponse(outcome, PATH, response));
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperationTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperationTest.java
index 0850bb358..78f465ea8 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperationTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperationTest.java
@@ -89,7 +89,7 @@ class HttpPollingOperationTest {
* Sets up.
*/
@BeforeEach
- void setUp() throws Exception {
+ void setUp() {
Mockito.lenient().when(client.getBaseUrl()).thenReturn(BASE_URI);
Mockito.lenient().when(config.getClient()).thenReturn(client);
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperatorTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperatorTest.java
index ca81e2eb3..13a16bfc2 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperatorTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpPollingOperatorTest.java
@@ -29,7 +29,6 @@ import static org.mockito.Mockito.when;
import java.util.Collections;
import java.util.Map;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java
index 27b841a91..d2ca7dbc6 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java
@@ -137,7 +137,7 @@ class OperationPartialTest {
* Attaches the appender to the logger.
*/
@BeforeAll
- static void setUpBeforeClass() throws Exception {
+ static void setUpBeforeClass() {
/*
* Attach appender to the logger.
*/
@@ -565,7 +565,7 @@ class OperationPartialTest {
*/
@Test
@SuppressWarnings("unchecked")
- void testAnyOfEdge() throws Exception {
+ void testAnyOfEdge() {
List<Supplier<CompletableFuture<OperationOutcome>>> tasks = new LinkedList<>();
// zero items: check both using a list and using an array
@@ -651,7 +651,7 @@ class OperationPartialTest {
*/
@Test
@SuppressWarnings("unchecked")
- void testAllOfEdge() throws Exception {
+ void testAllOfEdge() {
List<Supplier<CompletableFuture<OperationOutcome>>> tasks = new LinkedList<>();
// zero items: check both using a list and using an array
@@ -667,7 +667,7 @@ class OperationPartialTest {
}
@Test
- void testAttachFutures() throws Exception {
+ void testAttachFutures() {
List<Supplier<CompletableFuture<OperationOutcome>>> tasks = new LinkedList<>();
// third task throws an exception during construction
@@ -770,7 +770,7 @@ class OperationPartialTest {
*/
@Test
@SuppressWarnings("unchecked")
- void testSequenceEdge() throws Exception {
+ void testSequenceEdge() {
List<Supplier<CompletableFuture<OperationOutcome>>> tasks = new LinkedList<>();
// zero items: check both using a list and using an array
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/PipelineControllerFutureTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/PipelineControllerFutureTest.java
index c0d3a0df8..2c8275986 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/PipelineControllerFutureTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/PipelineControllerFutureTest.java
@@ -157,7 +157,7 @@ class PipelineControllerFutureTest {
* Tests completeAsync(executor) when canceled before execution.
*/
@Test
- void testCompleteAsyncSupplierOfQextendsTExecutorCanceled() throws Exception {
+ void testCompleteAsyncSupplierOfQextendsTExecutorCanceled() {
CompletableFuture<String> future = controller.completeAsync(() -> TEXT, executor);
assertTrue(future.cancel(false));
@@ -181,7 +181,7 @@ class PipelineControllerFutureTest {
* Tests completeAsync() when canceled.
*/
@Test
- void testCompleteAsyncSupplierOfQextendsTCanceled() throws Exception {
+ void testCompleteAsyncSupplierOfQextendsTCanceled() {
CountDownLatch canceled = new CountDownLatch(1);
// run async, but await until canceled
@@ -210,7 +210,7 @@ class PipelineControllerFutureTest {
@Test
void testCompleteOnTimeoutTLongTimeUnit() throws Exception {
CountDownLatch stopped = new CountDownLatch(1);
- controller.add(() -> stopped.countDown());
+ controller.add(stopped::countDown);
CompletableFuture<String> future = controller.completeOnTimeout(TEXT, 1, TimeUnit.MILLISECONDS);
@@ -288,7 +288,7 @@ class PipelineControllerFutureTest {
* Tests delayedComplete() when an exception is generated.
*/
@Test
- void testDelayedCompleteWithException() throws Exception {
+ void testDelayedCompleteWithException() {
controller.add(runnable1);
BiConsumer<String, Throwable> stopper = controller.delayedComplete();
@@ -314,7 +314,7 @@ class PipelineControllerFutureTest {
}
@Test
- void testDelayedRemoveFutureOfF() throws Exception {
+ void testDelayedRemoveFutureOfF() {
BiConsumer<String, Throwable> remover = controller.delayedRemove(future1);
remover.accept(TEXT, EXPECTED_EXCEPTION);
@@ -331,7 +331,7 @@ class PipelineControllerFutureTest {
}
@Test
- void testDelayedRemoveRunnable() throws Exception {
+ void testDelayedRemoveRunnable() {
BiConsumer<String, Throwable> remover = controller.delayedRemove(runnable1);
remover.accept(TEXT, EXPECTED_EXCEPTION);
@@ -380,7 +380,7 @@ class PipelineControllerFutureTest {
* Tests wrap(), when the controller is not running.
*/
@Test
- void testWrapNotRunning() throws Exception {
+ void testWrapNotRunning() {
controller.cancel(false);
controller = spy(controller);
@@ -395,7 +395,7 @@ class PipelineControllerFutureTest {
* Tests wrap(), when the future throws an exception.
*/
@Test
- void testWrapException() throws Exception {
+ void testWrapException() {
controller = spy(controller);
CompletableFuture<String> future = controller.wrap(compFuture);
@@ -428,7 +428,7 @@ class PipelineControllerFutureTest {
* Tests wrap(Function) when the controller is canceled after the future is added.
*/
@Test
- void testWrapFunctionCancel() throws Exception {
+ void testWrapFunctionCancel() {
Function<String, CompletableFuture<String>> func = controller.wrap(input -> compFuture);
CompletableFuture<String> future = func.apply(TEXT);
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/ForwarderTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/ForwarderTest.java
index e050416f5..f27eb6ae5 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/ForwarderTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/ForwarderTest.java
@@ -31,7 +31,6 @@ import static org.mockito.Mockito.verify;
import java.util.Arrays;
import java.util.Map;
import java.util.function.BiConsumer;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
index 7a6eb6859..ed77525be 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
@@ -3,7 +3,7 @@
*
* ================================================================================
* Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 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.
@@ -42,7 +42,6 @@ import org.onap.aai.domain.yang.Vserver;
public class AaiCqResponse implements Serializable {
private static final long serialVersionUID = 1L;
- public static final String CONTEXT_KEY = AaiConstants.CONTEXT_PREFIX + "AaiCqResponse";
public static final String OPERATION = "CustomQuery";
private static final String GENERIC_VNF = "generic-vnf";
private static final String VF_MODULE = "vf-module";
@@ -50,7 +49,7 @@ public class AaiCqResponse implements Serializable {
@SerializedName("results")
private List<Serializable> inventoryResponseItems = new LinkedList<>();
- private final Gson gson;
+ private final transient Gson gson;
/**
* Constructor creates a custom query response from a valid json string.
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
index a6a671815..26a39875f 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
@@ -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-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,6 +25,7 @@ package org.onap.policy.aai;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@@ -48,8 +49,6 @@ import org.slf4j.LoggerFactory;
@AllArgsConstructor
public final class AaiManager {
- // TODO remove this class
-
/** The Constant logger. */
private static final Logger logger = LoggerFactory.getLogger(AaiManager.class);
@@ -246,12 +245,12 @@ public final class AaiManager {
pnfName = URLEncoder.encode(pnfName, StandardCharsets.UTF_8.toString()) + AAI_DEPTH_SUFFIX;
} catch (UnsupportedEncodingException e) {
logger.error("Failed to encode the pnfName: {} using UTF-8", pnfName, e);
- return null;
+ return Collections.emptyMap();
}
var responseGet = getStringQuery(urlGet, username, password, requestId, pnfName);
if (responseGet == null) {
logger.error("Null response from AAI for the url: {}.", urlGet);
- return null;
+ return Collections.emptyMap();
}
try {
@SuppressWarnings("unchecked")
@@ -261,7 +260,7 @@ public final class AaiManager {
.collect(Collectors.toMap(e -> "pnf." + e.getKey(), Map.Entry::getValue));
} catch (CoderException e) {
logger.error("Failed to fetch PNF from AAI", e);
- return null;
+ return Collections.emptyMap();
}
}
}
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
index 72a78147b..0a47fcb05 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/CommonHeaderTest.java
@@ -87,7 +87,7 @@ class CommonHeaderTest {
assertEquals(commonHeader, (Object) commonHeader);
assertEquals(commonHeader, copiedCommonHeader);
- assertNotEquals(commonHeader, null);
+ assertNotNull(commonHeader);
assertNotEquals(commonHeader, (Object) "Hello");
CommonHeader clonedCommonHeader = new CommonHeader(commonHeader);
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
index 7ab4ae746..67b3d85d4 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/RequestTest.java
@@ -76,7 +76,7 @@ class RequestTest {
assertEquals(request, (Object) request);
assertEquals(request, copiedRequest);
- assertNotEquals(request, null);
+ assertNotNull(request);
assertNotEquals(request, (Object) "Hello");
checkField(commonHeader, Request::setCommonHeader);
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
index a13e08f64..f095df909 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseStatusTest.java
@@ -58,7 +58,7 @@ class ResponseStatusTest {
assertEquals(status, (Object) status);
assertEquals(status, copiedStatus);
- assertNotEquals(status, null);
+ assertNotNull(status);
assertNotEquals(status, (Object) "Hello");
status.setCode(-1);
diff --git a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
index ee0ff371b..dffb9588c 100644
--- a/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
+++ b/models-interactions/model-impl/appc/src/test/java/org/onap/policy/appc/ResponseTest.java
@@ -70,7 +70,7 @@ class ResponseTest {
assertEquals(response, (Object) response);
assertEquals(response, copiedResponse);
- assertNotEquals(response, null);
+ assertNotNull(response);
assertNotEquals(response, (Object) "Hello");
response.setCommonHeader(null);
diff --git a/models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java b/models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java
index 1a35064ca..b0a605b8c 100644
--- a/models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java
+++ b/models-interactions/model-impl/cds/src/test/java/org/onap/policy/cds/client/CdsProcessorGrpcClientTest.java
@@ -152,9 +152,7 @@ class CdsProcessorGrpcClientTest {
@Test
void testCdsProcessorGrpcClientConstructorFailure() {
props.setHost(null);
- assertThrows(IllegalStateException.class, () -> {
- new CdsProcessorGrpcClient(listener, props).close();
- });
+ assertThrows(IllegalStateException.class, () -> new CdsProcessorGrpcClient(listener, props));
}
@Test
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java
index 4f0dbf730..8ac1c3f49 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopEvent.java
@@ -3,7 +3,7 @@
* controlloop
* ================================================================================
* 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.
@@ -47,7 +47,7 @@ public abstract class ControlLoopEvent implements Serializable {
protected String policyName;
protected String policyVersion;
protected ControlLoopEventStatus closedLoopEventStatus;
- protected Map<String, String> additionalEventParams;
+ private Map<String, String> additionalEventParams;
/**
* Construct an instance from an existing instance.
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java
index b7622bde2..12900a2b4 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/VirtualControlLoopEvent.java
@@ -3,7 +3,7 @@
* controlloop
* ================================================================================
* 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.
@@ -39,7 +39,7 @@ public class VirtualControlLoopEvent extends ControlLoopEvent {
private static final long serialVersionUID = -5752405682246066226L;
@SerializedName("AAI")
- protected Map<String, String> aai = new HashMap<>();
+ private Map<String, String> aai = new HashMap<>();
protected String payload;
protected Instant closedLoopAlarmStart;
protected Instant closedLoopAlarmEnd;
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
index 4770000c8..b14df21ef 100644
--- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
+++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopOperationTest.java
@@ -37,7 +37,7 @@ class ControlLoopOperationTest {
assertEquals(operation, (Object) operation);
assertNotEquals(operation, (Object) "");
- assertNotEquals(operation, null);
+ assertNotNull(operation);
assertNotEquals(0, operation.hashCode());
assertTrue(operation.toString().startsWith("ControlLoopOperation"));
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
index 23c9cea3b..5f21633e3 100644
--- a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/HttpDeleteWithBodyTest.java
@@ -33,6 +33,6 @@ class HttpDeleteWithBodyTest {
void testGetMethod() {
HttpDeleteWithBody deleteWithBody = new HttpDeleteWithBody(NO_URI);
assertEquals("DELETE", deleteWithBody.getMethod());
- assertEquals(deleteWithBody.getURI().toString(), NO_URI);
+ assertEquals(NO_URI, deleteWithBody.getURI().toString());
}
} \ No newline at end of file
diff --git a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java
index 28136e667..7a2177136 100644
--- a/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java
+++ b/models-interactions/model-impl/rest/src/test/java/org/onap/policy/rest/RestTest.java
@@ -107,7 +107,7 @@ public class RestTest {
* @throws Exception if there is a problem
*/
@AfterAll
- public static void tearDown() throws Exception {
+ public static void tearDown() {
HttpServletServerFactoryInstance.getServerFactory().destroy();
}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
index 1885ed124..d852e8bda 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
@@ -80,7 +80,7 @@ class PciCommonHeaderTest {
assertEquals(commonHeader, (Object) commonHeader);
assertEquals(commonHeader, copiedPciCommonHeader);
- assertNotEquals(commonHeader, null);
+ assertNotNull(commonHeader);
assertNotEquals(commonHeader, (Object) "Hello");
PciCommonHeader clonedPciCommonHeader = new PciCommonHeader(commonHeader);
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
index 1334fcc42..00eb694e8 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
@@ -61,7 +61,7 @@ class PciRequestTest {
assertEquals(request, (Object) request);
assertEquals(request, copiedPciRequest);
- assertNotEquals(request, null);
+ assertNotNull(request);
assertNotEquals(request, (Object) "Hello");
request.setCommonHeader(null);
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
index 722c081d4..a4a3e45b0 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
@@ -54,7 +54,7 @@ class PciRequestWrapperTest {
assertEquals(requestWrapper, (Object) requestWrapper);
assertEquals(requestWrapper, copiedPciRequestWrapper);
- assertNotEquals(requestWrapper, null);
+ assertNotNull(requestWrapper);
assertNotEquals(requestWrapper, (Object) "Hello");
requestWrapper.setBody(null);
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
index 70480b1f7..d2e28fd68 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseTest.java
@@ -67,8 +67,7 @@ class PciResponseTest {
@Test
void testEqualsObject() {
PciResponse response = new PciResponse();
- assertEquals(response, response);
- assertNotEquals(response, null);
+ assertNotNull(response);
assertNotEquals(response, new Object());
PciResponse response2 = new PciResponse();
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
index 1b0247336..a34d65c9d 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciResponseWrapperTest.java
@@ -50,17 +50,13 @@ class PciResponseWrapperTest {
copiedPciResponseWrapper.setBody(responseWrapper.getBody());
assertEquals(responseWrapper, (Object) responseWrapper);
- //assertEquals(responseWrapper, copiedPciResponseWrapper);
- assertNotEquals(responseWrapper, null);
+ assertNotNull(responseWrapper);
assertNotEquals(responseWrapper, (Object) "Hello");
responseWrapper.setBody(null);
assertNotEquals(responseWrapper, copiedPciResponseWrapper);
copiedPciResponseWrapper.setBody(null);
- //assertEquals(responseWrapper, copiedPciResponseWrapper);
responseWrapper.setBody(response);
- //assertNotEquals(responseWrapper, copiedPciResponseWrapper);
copiedPciResponseWrapper.setBody(response);
- //assertEquals(responseWrapper, copiedPciResponseWrapper);
}
}
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
index e8f779edb..495fc133f 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
@@ -52,7 +52,7 @@ class PciStatusTest {
assertEquals(status, (Object) status);
assertEquals(status, copiedStatus);
- assertNotEquals(status, null);
+ assertNotNull(status);
assertNotEquals(status, (Object) "Hello");
status.setCode(-1);
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
index 8e915c3e9..3c11c0966 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
@@ -71,7 +71,7 @@ class PciWrapperTest {
assertEquals(wrapper, (Object) wrapper);
assertEquals(wrapper, copiedPciWrapper);
- assertNotEquals(wrapper, null);
+ assertNotNull(wrapper);
assertNotEquals(wrapper, (Object) "Hello");
checkField(VERSION_19, PciWrapper::setVersion);
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
index 98a828979..64fc4ac60 100644
--- a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
@@ -115,7 +115,7 @@ class SoRequestDetailsTest {
assertEquals(details, (Object) details);
assertEquals(details, copiedDetails);
- assertNotEquals(details, null);
+ assertNotNull(details);
assertNotEquals(details, (Object) "Hello");
checkField(cloudConfiguration, SoRequestDetails::setCloudConfiguration);
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
index f33bfd72f..32298816e 100644
--- a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
@@ -74,7 +74,7 @@ class SoResponseWrapperTest {
assertEquals(responseWrapper, (Object) responseWrapper);
assertEquals(responseWrapper, identicalResponseWrapper);
- assertNotEquals(responseWrapper, null);
+ assertNotNull(responseWrapper);
assertNotEquals(responseWrapper, (Object) "AString");
assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null));
diff --git a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
index f3d5b3b96..d7cfd18bd 100644
--- a/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
+++ b/models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/CdsSimulatorTest.java
@@ -127,7 +127,7 @@ class CdsSimulatorTest {
}
@Test
- void testGetResponse() throws IOException, CoderException, ParseException {
+ void testGetResponse() throws IOException, CoderException {
CdsSimulator cdsSimulator = new CdsSimulator(Util.LOCALHOST, sim.getPort());
String reqstr = ResourceUtils.getResourceAsString(
"org/onap/policy/simulators/cds/cds.request.json");