Fix maven dependencies to a matching one for kie maven plugin 43/141543/4
authoradheli.tavares <adheli.tavares@est.tech>
Fri, 18 Jul 2025 13:02:34 +0000 (14:02 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Fri, 18 Jul 2025 13:02:34 +0000 (14:02 +0100)
- fix maven dependencies
- fix sonar issues

Issue-ID: POLICY-5414
Change-Id: I335e34c24f5e0f7c174f13bc42607f4328a6514b
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
34 files changed:
controlloop/common/controller-usecases/pom.xml
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/AaiCqStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/AaiGetPnfStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/AaiGetTenantStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/GetTargetEntityStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/GuardStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/LockStep2Test.java
controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/step/Step2Test.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParamsTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEventTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithOutcomeTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithStepsTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/EventManagerServicesTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/LockDataTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/StepTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerImplTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerParamsTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ophistory/OperationHistoryDataManagerStubTest.java
controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/utils/ControlLoopUtilsTest.java
controlloop/common/feature-controlloop-management/pom.xml
controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/apps/controlloop/feature/management/ControlLoopManagementFeatureTest.java
controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java
controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/server/restful/RestTransactionTrackerTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/HttpClientsTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/ListenerTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunner2Test.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunnerTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/RulesTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/SimulatorsTest.java
controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/TopicsTest.java

index 80a70d8..3aad9cd 100644 (file)
             <artifactId>spring-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+            <version>3.8.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-compat</artifactId>
+            <version>3.8.6</version>
+        </dependency>
     </dependencies>
 
     <profiles>
index 1f2d771..729321b 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * 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 AaiCqStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         future = new CompletableFuture<>();
 
         when(params.toBuilder()).thenReturn(ControlLoopOperationParams.builder().actorService(actors)
index 8f25599..bf3a061 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@ class AaiGetPnfStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         future = new CompletableFuture<>();
 
         when(params.toBuilder()).thenReturn(ControlLoopOperationParams.builder().actorService(actors)
index 9d95b0b..50d59a7 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -71,7 +71,7 @@ class AaiGetTenantStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         future = new CompletableFuture<>();
 
         when(params.toBuilder()).thenReturn(ControlLoopOperationParams.builder().actorService(actors)
index a975e0b..32e4372 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ class GetTargetEntityStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         when(params.toBuilder()).thenReturn(ControlLoopOperationParams.builder());
 
         master = new Step2(stepContext, params, event);
index 4d158de..e0043dd 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +41,6 @@ import org.onap.aai.domain.yang.RelatedToProperty;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.RelationshipList;
-import org.onap.aai.domain.yang.Vserver;
 import org.onap.policy.aai.AaiCqResponse;
 import org.onap.policy.controlloop.VirtualControlLoopEvent;
 import org.onap.policy.controlloop.actor.so.VfModuleCreate;
@@ -76,7 +75,6 @@ class GuardStep2Test {
     private final AaiCqResponse customQuery = mock(AaiCqResponse.class);
     private final GenericVnf genericVnf = mock(GenericVnf.class);
     private final CloudRegion cloudRegion = mock(CloudRegion.class);
-    private final Vserver theVserver = mock(Vserver.class);
 
     private TargetType target;
     private Map<String, String> aai = new HashMap<>();
@@ -89,7 +87,7 @@ class GuardStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         aai.put("vserver.vserver-name", MY_SERVERNAME);
         when(event.getAai()).thenReturn(aai);
 
index 2940108..b1a7894 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ class LockStep2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         future = new CompletableFuture<>();
 
         when(stepContext.requestLock(MY_TARGET)).thenReturn(future);
index 7a557c2..3a69013 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -96,7 +96,7 @@ class Step2Test {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         // configure policy operation
         when(actors.getActor(POLICY_ACTOR)).thenReturn(policyActor);
         when(policyActor.getOperator(POLICY_OPERATION)).thenReturn(policyOperator);
index a09ea85..5e7610a 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ class ControlLoopParamsTest {
      * Prepare tests.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         clp.setClosedLoopControlName(CONTROL_LOOP_NAME);
         clp.setPolicyName(POLICY_NAME);
         clp.setPolicyScope(POLICY_SCOPE);
index 6b60ec8..bdb0119 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021, 2023 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@ class ClEventManagerWithEventTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() throws ControlLoopException, CoderException {
+    void setUp() throws ControlLoopException, CoderException {
         when(services.getActorService()).thenReturn(actors);
         when(services.getDataManager()).thenReturn(dataMgr);
 
@@ -341,12 +341,12 @@ class ClEventManagerWithEventTest {
 
         @Override
         protected void loadPolicyStep(ControlLoopOperationParams params) {
-            getSteps().add(new MyStep(this, params, getEvent()));
+            getSteps().add(new MyStep(params));
         }
     }
 
     private static class MyStep extends Step {
-        public MyStep(StepContext stepContext, ControlLoopOperationParams params, VirtualControlLoopEvent event) {
+        public MyStep(ControlLoopOperationParams params) {
             super(params, new AtomicReference<>());
         }
     }
index 17e8104..a4bcdcc 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021, 2023 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import static org.mockito.Mockito.when;
 import java.time.Instant;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.UUID;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.atomic.AtomicReference;
@@ -48,12 +49,9 @@ import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardYamlCoder;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 import org.onap.policy.controlloop.ControlLoopException;
-import org.onap.policy.controlloop.actorserviceprovider.Operation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
-import org.onap.policy.controlloop.actorserviceprovider.Operator;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
-import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
 import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
 import org.onap.policy.drools.core.lock.LockCallback;
 import org.onap.policy.drools.core.lock.LockImpl;
@@ -81,13 +79,8 @@ class ClEventManagerWithOutcomeTest {
     private final PolicyEngine engineMgr = mock(PolicyEngine.class);
     private final WorkingMemory workMem = mock(WorkingMemory.class);
     private final InternalFactHandle factHandle = mock(InternalFactHandle.class);
-    private final Operator policyOperator = mock(Operator.class);
-    private final Operation policyOperation = mock(Operation.class);
-    private final Actor policyActor = mock(Actor.class);
     private final EventManagerServices services = mock(EventManagerServices.class);
     private final ExecutorService executor = mock(ExecutorService.class);
-    private final MyStep stepa = mock(MyStep.class);
-    private final MyStep stepb = mock(MyStep.class);
 
     private List<LockImpl> locks;
     private ToscaPolicy tosca;
@@ -98,7 +91,7 @@ class ClEventManagerWithOutcomeTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() throws ControlLoopException, CoderException {
+    void setUp() throws ControlLoopException, CoderException {
         when(workMem.getFactHandle(any())).thenReturn(factHandle);
 
         params = new ControlLoopParams();
@@ -130,7 +123,7 @@ class ClEventManagerWithOutcomeTest {
 
         // start and load step for first policy
         mgr.start();
-        assertEquals("OperationA", mgr.getSteps().poll().getOperationName());
+        assertEquals("OperationA", Objects.requireNonNull(mgr.getSteps().poll()).getOperationName());
         assertNull(mgr.getFinalResult());
 
         // add an outcome
@@ -139,7 +132,7 @@ class ClEventManagerWithOutcomeTest {
 
         // indicate success and load next policy
         mgr.loadNextPolicy(OperationResult.SUCCESS);
-        assertEquals("OperationB", mgr.getSteps().poll().getOperationName());
+        assertEquals("OperationB", Objects.requireNonNull(mgr.getSteps().poll()).getOperationName());
         assertNull(mgr.getFinalResult());
 
         // loadPolicy() should clear the partial history, but not the full history
@@ -195,6 +188,7 @@ class ClEventManagerWithOutcomeTest {
         assertThat(mgr.getPartialHistory()).hasSize(1);
         assertThat(mgr.getFullHistory()).hasSize(1);
         assertSame(outcome, mgr.getPartialHistory().peek().getOutcome());
+        assertNotNull(mgr.getFullHistory().peek());
         assertSame(outcome, mgr.getFullHistory().peek().getOutcome());
 
         // add another start
@@ -204,6 +198,7 @@ class ClEventManagerWithOutcomeTest {
         assertThat(mgr.getPartialHistory()).hasSize(2);
         assertThat(mgr.getFullHistory()).hasSize(2);
         assertSame(outcome, mgr.getPartialHistory().peekLast().getOutcome());
+        assertNotNull(mgr.getFullHistory().peekLast());
         assertSame(outcome, mgr.getFullHistory().peekLast().getOutcome());
 
         // remove the last item from the full history and then add a "completion"
@@ -226,6 +221,7 @@ class ClEventManagerWithOutcomeTest {
         assertThat(mgr.getPartialHistory()).hasSize(4);
         assertThat(mgr.getFullHistory()).hasSize(4);
         assertSame(outcome, mgr.getPartialHistory().peekLast().getOutcome());
+        assertNotNull(mgr.getFullHistory().peekLast());
         assertSame(outcome, mgr.getFullHistory().peekLast().getOutcome());
     }
 
@@ -360,13 +356,13 @@ class ClEventManagerWithOutcomeTest {
 
         @Override
         protected void loadPolicyStep(ControlLoopOperationParams params) {
-            getSteps().add(new MyStep(this, params));
+            getSteps().add(new MyStep(params));
         }
     }
 
 
     private static class MyStep extends Step {
-        public MyStep(StepContext stepContext, ControlLoopOperationParams params) {
+        public MyStep(ControlLoopOperationParams params) {
             super(params, new AtomicReference<>());
         }
     }
index b9ec075..0ec3efa 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021, 2023 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@ class ClEventManagerWithStepsTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() throws ControlLoopException, CoderException {
+    void setUp() throws ControlLoopException, CoderException {
         when(services.getActorService()).thenReturn(actors);
 
         when(workMem.getFactHandle(any())).thenReturn(factHandle);
@@ -193,7 +193,7 @@ class ClEventManagerWithStepsTest {
      * Tests start() when the manager is not in working memory.
      */
     @Test
-    void testStartNotInWorkingMemory() throws ControlLoopException {
+    void testStartNotInWorkingMemory() {
         when(workMem.getFactHandle(any())).thenReturn(null);
 
         assertThatCode(() -> mgr.start()).isInstanceOf(IllegalStateException.class)
@@ -273,7 +273,7 @@ class ClEventManagerWithStepsTest {
 
     @Test
     void testLoadPreprocessorSteps() {
-        stepa = new MyStep(mgr, ControlLoopOperationParams.builder().build()) {
+        stepa = new MyStep(ControlLoopOperationParams.builder().build()) {
             @Override
             protected Operation buildOperation() {
                 return policyOperation;
@@ -302,7 +302,7 @@ class ClEventManagerWithStepsTest {
      */
     @Test
     void testLoadPreprocessorStepsTooManySteps() {
-        stepa = new MyStep(mgr, ControlLoopOperationParams.builder().build()) {
+        stepa = new MyStep(ControlLoopOperationParams.builder().build()) {
             @Override
             protected Operation buildOperation() {
                 return policyOperation;
@@ -427,7 +427,7 @@ class ClEventManagerWithStepsTest {
 
         @Override
         protected void loadPolicyStep(ControlLoopOperationParams params) {
-            getSteps().add(new MyStep(this, params));
+            getSteps().add(new MyStep(params));
         }
     }
 
@@ -443,12 +443,12 @@ class ClEventManagerWithStepsTest {
 
         @Override
         protected void loadPolicyStep(ControlLoopOperationParams params) {
-            getSteps().add(new MyStep(this, params));
+            getSteps().add(new MyStep(params));
         }
     }
 
     private static class MyStep extends Step {
-        public MyStep(StepContext stepContext, ControlLoopOperationParams params) {
+        public MyStep(ControlLoopOperationParams params) {
             super(params, new AtomicReference<>());
         }
     }
index d83c3fe..9aec21c 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ class ControlLoopEventManagerTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() throws ControlLoopException, CoderException {
+    void setUp() throws ControlLoopException, CoderException {
         when(services.getDataManager()).thenReturn(dataMgr);
 
         params = new ControlLoopParams();
@@ -145,7 +145,7 @@ class ControlLoopEventManagerTest {
 
         // ensure destroy() doesn't throw an exception if the object is deserialized
         var mgr2 = Serializer.roundTrip(mgr);
-        assertThatCode(() -> mgr2.destroy()).doesNotThrowAnyException();
+        assertThatCode(mgr2::destroy).doesNotThrowAnyException();
 
         // locks should not have been freed
         for (var lock : locks) {
@@ -162,7 +162,7 @@ class ControlLoopEventManagerTest {
     }
 
     @Test
-    void testDetmControlLoopTimeoutMs() throws Exception {
+    void testDetmControlLoopTimeoutMs() {
         long timeMs = 1200 * 1000L;
         long end = mgr.getEndTimeMs();
         assertThat(end).isGreaterThanOrEqualTo(preCreateTimeMs + timeMs).isLessThan(preCreateTimeMs + timeMs + 5000);
@@ -330,7 +330,7 @@ class ControlLoopEventManagerTest {
      * Tests getDataManager() when not disabled.
      */
     @Test
-    void testGetDataManagerNotDisabled() throws ControlLoopException {
+    void testGetDataManagerNotDisabled() {
         assertThat(mgr.getDataManager()).isSameAs(dataMgr);
     }
 
index 4af45e5..cc360ef 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@ package org.onap.policy.controlloop.eventmanager;
 
 import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -50,7 +50,7 @@ class EventManagerServicesTest {
      * Configures HTTP clients.
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws Exception {
+    static void setUpBeforeClass() throws Exception {
         // start with a clean slate
         HttpClientFactoryInstance.getClientFactory().destroy();
 
@@ -61,12 +61,12 @@ class EventManagerServicesTest {
     }
 
     @AfterAll
-    public static void teatDownBeforeClass() {
+    static void teatDownBeforeClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         closeDb();
     }
 
@@ -74,12 +74,12 @@ class EventManagerServicesTest {
     void testEventManagerServices_testGetActorService() {
         // try with guard disabled - should use DB stub
         services = new EventManagerServices(FILEPFX + "event-svc-guard-disabled");
-        assertTrue(services.getDataManager() instanceof OperationHistoryDataManagerStub);
+        assertInstanceOf(OperationHistoryDataManagerStub.class, services.getDataManager());
         assertNotNull(services.getActorService());
 
         // try with guard enabled - should create a DB connection
         services = new EventManagerServices(FILEPFX + "event-svc-with-db");
-        assertTrue(services.getDataManager() instanceof OperationHistoryDataManagerImpl);
+        assertInstanceOf(OperationHistoryDataManagerImpl.class, services.getDataManager());
         assertNotNull(services.getActorService());
     }
 
@@ -93,7 +93,7 @@ class EventManagerServicesTest {
     void testIsGuardEnabled() {
         // cannot check guard
         services = new EventManagerServices(FILEPFX + "event-svc-no-guard-actor");
-        assertTrue(services.getDataManager() instanceof OperationHistoryDataManagerStub);
+        assertInstanceOf(OperationHistoryDataManagerStub.class, services.getDataManager());
 
         // force exception when checking for guard operator
         services = new EventManagerServices(FILEPFX + "event-svc-with-db") {
@@ -104,7 +104,7 @@ class EventManagerServicesTest {
                 return svc;
             }
         };
-        assertTrue(services.getDataManager() instanceof OperationHistoryDataManagerStub);
+        assertInstanceOf(OperationHistoryDataManagerStub.class, services.getDataManager());
     }
 
     @Test
index 609de57..0171aa9 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ class LockDataTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         data = new LockData(ENTITY, REQ_ID);
     }
 
index 29c92a0..50cec66 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -90,7 +90,7 @@ class StepTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         future = new CompletableFuture<>();
 
         // configure policy operation
@@ -154,7 +154,7 @@ class StepTest {
         assertEquals("operB", params2.getOperation());
         assertNull(params2.getRetry());
         assertNull(params2.getTimeoutSec());
-        assertEquals(target.getTargetType().toString(), params2.getTargetType().toString());
+        assertEquals(target.getTargetType(), params2.getTargetType().toString());
         assertSame(entityIds, params2.getTargetEntityIds());
         assertTrue(params2.getPayload().isEmpty());
 
index 397c1c5..f76ee3c 100644 (file)
@@ -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-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ class OperationHistoryDataManagerImplTest {
      * Sets up for all tests.
      */
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         var params = makeBuilder().build();
 
         // capture the entity manager factory for re-use
@@ -98,7 +98,7 @@ class OperationHistoryDataManagerImplTest {
      * Restores the environment after all tests.
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         emf.close();
     }
 
@@ -106,7 +106,7 @@ class OperationHistoryDataManagerImplTest {
      * Sets up for an individual test.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         event = new VirtualControlLoopEvent();
         event.setClosedLoopControlName(MY_LOOP_NAME);
         event.setRequestId(UUID.randomUUID());
@@ -131,7 +131,7 @@ class OperationHistoryDataManagerImplTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         mgr.stop();
     }
 
index 623df93..179649b 100644 (file)
@@ -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-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ class OperationHistoryDataManagerParamsTest {
     private OperationHistoryDataManagerParams params;
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         params = makeBuilder().build();
     }
 
index d4a5cfd..d64d19d 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,6 +32,6 @@ class OperationHistoryDataManagerStubTest {
         var mgr = new OperationHistoryDataManagerStub();
 
         assertThatCode(() -> mgr.store(null, null, null, null, null)).doesNotThrowAnyException();
-        assertThatCode(() -> mgr.stop()).doesNotThrowAnyException();
+        assertThatCode(mgr::stop).doesNotThrowAnyException();
     }
 }
index 55e9803..cf356fd 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,11 +25,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
 
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.resources.ResourceUtils;
-import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
 
 class ControlLoopUtilsTest {
@@ -43,6 +42,7 @@ class ControlLoopUtilsTest {
             serviceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get("operational.restart");
 
         var params = ControlLoopUtils.toControlLoopParams(toscaPolicy);
+        Assertions.assertNotNull(params);
         assertEquals("ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", params.getClosedLoopControlName());
         assertEquals(toscaPolicy.getName(), params.getPolicyName());
         assertEquals(toscaPolicy.getVersion(), params.getPolicyVersion());
index 5248457..e96ca27 100644 (file)
             <artifactId>awaitility</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+            <version>3.8.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-compat</artifactId>
+            <version>3.8.6</version>
+        </dependency>
     </dependencies>
 </project>
index e6bd7c3..6ea83a8 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -47,12 +47,12 @@ class ControlLoopManagementFeatureTest {
     private static Factory saveFactory;
 
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         saveFactory = (Factory) ReflectionTestUtils.getField(ControlLoopManagementFeature.class, FACTORY_FIELD);
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         ReflectionTestUtils.setField(ControlLoopManagementFeature.class, FACTORY_FIELD, saveFactory);
     }
 
index b418fd8..69f91c9 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -90,7 +90,7 @@ class RestControlLoopManagerTest {
      * @throws Exception if failure to complete the setup.
      */
     @BeforeAll
-    public static void setUp() throws Exception {
+    static void setUp() throws Exception {
         System.setProperty("kie.maven.settings.custom", "src/test/resources/settings.xml");
         LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "WARN");
 
@@ -132,7 +132,7 @@ class RestControlLoopManagerTest {
      * test tear down.
      */
     @AfterAll
-    public static void tearDown() {
+    static void tearDown() {
         PolicyControllerConstants.getFactory().get(CONTROLLER).stop();
         await().atMost(1, TimeUnit.MINUTES).until(isContainerAlive(), equalTo(Boolean.FALSE));
 
index a165f35..03fd4f0 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -68,20 +68,20 @@ class ControlLoopMetricsFeatureTest {
      * Setup method.
      */
     @BeforeAll
-    public static void setUp() {
+    static void setUp() {
         SystemPersistenceConstants.getManager().setConfigurationDir("src/test/resources");
         testController = PolicyEngineConstants.getManager().createPolicyController("metrics",
                 SystemPersistenceConstants.getManager().getControllerProperties("metrics"));
     }
 
     @AfterAll
-    public static void tearDown() {
+    static void tearDown() {
         SystemPersistenceConstants.getManager().setConfigurationDir(configPath.toString());
         resetStats();
     }
 
     @BeforeEach
-    public void beforeTest() {
+    void beforeTest() {
         resetStats();
     }
 
index 19d09e0..129bec8 100644 (file)
@@ -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-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ class RestTransactionTrackerTest {
     private static HttpClient client;
 
     @BeforeAll
-    public static void testBeforeClass() throws Exception {
+    static void testBeforeClass() throws Exception {
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
 
         HttpServletServerFactoryInstance.getServerFactory().destroy();
@@ -84,7 +84,7 @@ class RestTransactionTrackerTest {
     }
 
     @AfterAll
-    public static void testAfterClass() {
+    static void testAfterClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
 
index 2bd6a89..d369182 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,8 +53,6 @@ import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
 import org.onap.policy.controlloop.ControlLoopNotificationType;
 import org.onap.policy.controlloop.VirtualControlLoopNotification;
-import org.onap.policy.drools.controller.DroolsController;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
 import org.onap.policy.sdnr.PciBody;
 import org.onap.policy.sdnr.PciCommonHeader;
@@ -85,16 +83,13 @@ class BaseTestTest {
     private final Listener<Request> appcClSink = mock();
     private final Listener<AppcLcmMessageWrapper> appcLcmRead = mock();
     private final Listener<PciMessage> sdnrClSink = mock();
-    private final DroolsController drools = mock(DroolsController.class);
-    private final ToscaPolicy policy = mock(ToscaPolicy.class);
-    private final ToscaConceptIdentifier policyIdent = mock(ToscaConceptIdentifier.class);
 
     /**
      * Saves static values from the class.
      */
     @SuppressWarnings("unchecked")
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         httpClientMaker = (Supplier<HttpClients>) ReflectionTestUtils.getField(BaseTest.class, "httpClientMaker");
         simMaker = (Supplier<Simulators>) ReflectionTestUtils.getField(BaseTest.class, "simMaker");
         topicMaker = (Supplier<Topics>) ReflectionTestUtils.getField(BaseTest.class, "topicMaker");
@@ -104,7 +99,7 @@ class BaseTestTest {
      * Restores static values.
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         ReflectionTestUtils.setField(BaseTest.class, "httpClientMaker", httpClientMaker);
         ReflectionTestUtils.setField(BaseTest.class, "simMaker", simMaker);
         ReflectionTestUtils.setField(BaseTest.class, "topicMaker", topicMaker);
@@ -114,7 +109,7 @@ class BaseTestTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         when(topics.createListener(eq(BaseTest.POLICY_CL_MGT_TOPIC), eq(VirtualControlLoopNotification.class),
                         any(StandardCoder.class))).thenReturn(policyClMgt);
         when(topics.createListener(eq(BaseTest.APPC_LCM_READ_TOPIC), eq(AppcLcmMessageWrapper.class),
@@ -124,13 +119,13 @@ class BaseTestTest {
         when(topics.createListener(eq(BaseTest.SDNR_CL_TOPIC), eq(PciMessage.class), any(StandardCoder.class)))
                         .thenReturn(sdnrClSink);
 
-        Supplier<HttpClients> httpClientMaker = this::makeHttpClients;
-        Supplier<Simulators> simMaker = this::makeSim;
-        Supplier<Topics> topicMaker = this::makeTopics;
+        Supplier<HttpClients> localHttpClientMaker = this::makeHttpClients;
+        Supplier<Simulators> localSimMaker = this::makeSim;
+        Supplier<Topics> localTopicMaker = this::makeTopics;
 
-        ReflectionTestUtils.setField(BaseTest.class, "httpClientMaker", httpClientMaker);
-        ReflectionTestUtils.setField(BaseTest.class, "simMaker", simMaker);
-        ReflectionTestUtils.setField(BaseTest.class, "topicMaker", topicMaker);
+        ReflectionTestUtils.setField(BaseTest.class, "httpClientMaker", localHttpClientMaker);
+        ReflectionTestUtils.setField(BaseTest.class, "simMaker", localSimMaker);
+        ReflectionTestUtils.setField(BaseTest.class, "topicMaker", localTopicMaker);
 
         clMgtQueue = new LinkedList<>();
         appcLcmQueue = new LinkedList<>();
index c3c82d5..46b8ef7 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -85,7 +85,7 @@ class DroolsRuleTestTest {
      */
     @SuppressWarnings("unchecked")
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         ruleMaker = (Function<String, Rules>) ReflectionTestUtils.getField(DroolsRuleTest.class, "ruleMaker");
         httpClientMaker = (Supplier<HttpClients>) ReflectionTestUtils.getField(DroolsRuleTest.class, "httpClientMaker");
         simMaker = (Supplier<Simulators>) ReflectionTestUtils.getField(DroolsRuleTest.class, "simMaker");
@@ -96,7 +96,7 @@ class DroolsRuleTestTest {
      * Restores static values.
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         ReflectionTestUtils.setField(DroolsRuleTest.class, "ruleMaker", ruleMaker);
         ReflectionTestUtils.setField(DroolsRuleTest.class, "httpClientMaker", httpClientMaker);
         ReflectionTestUtils.setField(DroolsRuleTest.class, "simMaker", simMaker);
@@ -107,7 +107,7 @@ class DroolsRuleTestTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         when(rules.getController()).thenReturn(controller);
         when(rules.setupPolicyFromFile(any())).thenReturn(policy);
 
@@ -116,15 +116,15 @@ class DroolsRuleTestTest {
         when(topics.createListener(eq(DroolsRuleTest.APPC_LCM_READ_TOPIC), eq(AppcLcmMessageWrapper.class),
                         any(StandardCoder.class))).thenReturn(appcLcmRead);
 
-        Function<String, Rules> ruleMaker = this::makeRules;
-        Supplier<HttpClients> httpClientMaker = this::makeHttpClients;
-        Supplier<Simulators> simMaker = this::makeSim;
-        Supplier<Topics> topicMaker = this::makeTopics;
+        Function<String, Rules> localRuleMaker = this::makeRules;
+        Supplier<HttpClients> localHttpClientMaker = this::makeHttpClients;
+        Supplier<Simulators> localSimMaker = this::makeSim;
+        Supplier<Topics> localTopicMaker = this::makeTopics;
 
-        ReflectionTestUtils.setField(DroolsRuleTest.class, "ruleMaker", ruleMaker);
-        ReflectionTestUtils.setField(DroolsRuleTest.class, "httpClientMaker", httpClientMaker);
-        ReflectionTestUtils.setField(DroolsRuleTest.class, "simMaker", simMaker);
-        ReflectionTestUtils.setField(DroolsRuleTest.class, "topicMaker", topicMaker);
+        ReflectionTestUtils.setField(DroolsRuleTest.class, "ruleMaker", localRuleMaker);
+        ReflectionTestUtils.setField(DroolsRuleTest.class, "httpClientMaker", localHttpClientMaker);
+        ReflectionTestUtils.setField(DroolsRuleTest.class, "simMaker", localSimMaker);
+        ReflectionTestUtils.setField(DroolsRuleTest.class, "topicMaker", localTopicMaker);
 
         clMgtQueue = new LinkedList<>();
         appcLcmQueue = new LinkedList<>();
index d4c0680..7b3e4e3 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,12 +43,12 @@ class HttpClientsTest {
 
 
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         SystemPersistenceConstants.getManager().setConfigurationDir("src/test/resources");
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         HttpClientFactoryInstance.getClientFactory().destroy();
     }
 
index 614e768..770933d 100644 (file)
@@ -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-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ class ListenerTest {
      * Creates topics.
      */
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         TopicEndpointManager.getManager().shutdown();
 
         var params = new TopicParameters();
@@ -75,7 +75,7 @@ class ListenerTest {
     }
 
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         TopicEndpointManager.getManager().shutdown();
     }
 
@@ -83,7 +83,7 @@ class ListenerTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         when(mgr.getNoopTopicSink(MY_TOPIC)).thenReturn(sink);
 
         listener = new Listener<>(MY_TOPIC, msg -> msg + MSG_SUFFIX) {
index b61804c..81f7d53 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ class NamedRunner2Test {
     private static int testCount = 0;
 
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         assertEquals(2, testCount);
     }
 
index c9a13e2..53868b9 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ class NamedRunnerTest {
     private static int testCount = 0;
 
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         assertEquals(5, testCount);
     }
 
index 82f39c1..54594be 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@ class RulesTest {
      * Attaches the appender to the logger.
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws Exception {
+    static void setUpBeforeClass() {
         /*
          * Attach appender to the logger.
          */
@@ -119,7 +119,7 @@ class RulesTest {
      * Stops the appender.
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         appender.stop();
     }
 
@@ -127,7 +127,7 @@ class RulesTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         facts = new LinkedList<>();
         ruleListeners = new LinkedList<>();
         agendaListeners = new LinkedList<>();
@@ -200,7 +200,7 @@ class RulesTest {
     }
 
     @Test
-    void testStart() throws Exception {
+    void testStart() {
         verify(repo).setConfigurationDir("src/test/resources/config");
         assertTrue(installed);
         verify(engine).configure(any(Properties.class));
index 726f311..94121e5 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ class SimulatorsTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         simulators = new Simulators();
     }
 
index 0033561..8c6f658 100644 (file)
@@ -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-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ class TopicsTest {
     }
 
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         TopicEndpointManager.getManager().shutdown();
     }
 
@@ -97,7 +97,7 @@ class TopicsTest {
      * Sets up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         policy = new ToscaPolicy();
         policy.setName(POLICY_NAME);
         policy.setVersion("1.0.0");