Fix sonar issues 35/141535/1 master
authoradheli.tavares <adheli.tavares@est.tech>
Tue, 15 Jul 2025 15:35:57 +0000 (16:35 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Tue, 15 Jul 2025 15:36:59 +0000 (16:36 +0100)
- fix sonar issues
- change maven plugin dependencies version for conflicting with
kie-maven from drools.org

Issue-ID: POLICY-5414
Change-Id: If85a7193be8824bcca1039b3e22580c30dc4e1f3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
55 files changed:
feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckFeatureTest.java
feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java
feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java
feature-legacy-config/src/test/java/org/onap/policy/drools/legacy/config/LegacyConfigFeatureTest.java
feature-legacy-config/src/test/java/org/onap/policy/drools/legacy/config/LegacyConfigTest.java
feature-legacy-config/src/test/java/org/onap/policy/drools/server/restful/RestLegacyConfigTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsControllerTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
feature-no-locking/src/test/java/org/onap/policy/no/locking/NoLockManagerTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/EndToEndFeatureTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/PoolingManagerImplTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/PoolingPropertiesTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/TopicMessageManagerTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/message/IdentificationTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/message/LeaderTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/message/MessageTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/state/IdleStateTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java
feature-pooling-messages/src/test/java/org/onap/policy/drools/pooling/state/StateTest.java
feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java
feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionFeatureTest.java
feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java
policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java
policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java
policy-core/src/test/java/org/onap/policy/drools/core/jmx/PdpJmxTest.java
policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysFailLockTest.java
policy-core/src/test/java/org/onap/policy/drools/core/lock/AlwaysSuccessLockTest.java
policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java
policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java
policy-domains/src/test/java/org/onap/policy/drools/domain/models/DomainPolicyTypesTest.java
policy-domains/src/test/java/org/onap/policy/drools/domain/models/operational/OperationalPolicyTest.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java
policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerUpgradesTest.java
policy-management/src/test/java/org/onap/policy/drools/persistence/SystemPersistenceTest.java
policy-management/src/test/java/org/onap/policy/drools/protocol/coders/ProtocolCoderToolsetTest.java
policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java
policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java
policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java
policy-utils/src/test/java/org/onap/policy/drools/policies/StandardValCoderTest.java
policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java
pom.xml

index 579d53c..0586ff8 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2022 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.
@@ -238,7 +238,7 @@ class DistributedLockManagerTest {
     @Test
     void testServiceApis() {
         assertTrue(new OrderedServiceImpl<>(PolicyEngineFeatureApi.class).getList().stream()
-            .anyMatch(obj -> obj instanceof DistributedLockManager));
+            .anyMatch(DistributedLockManager.class::isInstance));
     }
 
     @Test
index 9041304..51761d1 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2017-2019,2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ import org.onap.policy.drools.util.KieUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class HealthCheckFeatureTest {
+class HealthCheckFeatureTest {
 
     private static final Logger logger = LoggerFactory.getLogger(HealthCheckFeatureTest.class);
     private static final String EXPECTED = "expected exception";
@@ -68,7 +68,7 @@ public class HealthCheckFeatureTest {
      * Set up.
      */
     @BeforeAll
-    public static void setup() throws IOException {
+    static void setup() throws IOException {
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
 
         LoggerUtils.setLevel("org.onap.policy.common.endpoints", "WARN");
@@ -95,7 +95,7 @@ public class HealthCheckFeatureTest {
      * Tear down.
      */
     @AfterAll
-    public static void teardown() {
+    static void teardown() {
         PolicyControllerConstants.getFactory().destroy();
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
index 8553301..f26552c 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -103,7 +103,7 @@ class HealthCheckManagerTest {
      * Initializes the object to be tested.
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() throws Exception {
         properties = new Properties();
         mocks();
 
index 4e75d31..5610a59 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -46,7 +46,7 @@ import org.onap.policy.drools.system.PolicyControllerFactory;
 /**
  * REST Healthcheck Tests.
  */
-public class RestHealthCheckTest {
+class RestHealthCheckTest {
 
     private static HttpClientFactory clientFactory;
     private static PolicyControllerFactory controllerFactory;
@@ -62,7 +62,7 @@ public class RestHealthCheckTest {
      */
 
     @BeforeAll
-    public static void setUp() throws Exception {
+    static void setUp() throws Exception {
         LoggerUtils.setLevel("org.onap.policy.common.endpoints", "WARN");
         LoggerUtils.setLevel("org.eclipse", "ERROR");
         LoggerUtils.setLevel("org.onap.policy.drools.healthcheck", "DEBUG");
@@ -105,7 +105,7 @@ public class RestHealthCheckTest {
      */
 
     @AfterAll
-    public static void tearDown() {
+    static void tearDown() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
index 85d152f..7449c68 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -40,7 +40,7 @@ class LegacyConfigFeatureTest {
      * Set up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
         configF = new LegacyConfigFeature();
     }
@@ -49,7 +49,7 @@ class LegacyConfigFeatureTest {
      * Tear down.
      */
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         NoopTopicFactories.getSourceFactory().destroy();
         NoopTopicFactories.getSinkFactory().destroy();
         SystemPersistenceConstants.getManager().setConfigurationDir(null);
index 69d5bf2..d84e13b 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -42,7 +42,7 @@ class LegacyConfigTest {
      * Set up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
     }
 
@@ -50,7 +50,7 @@ class LegacyConfigTest {
      * Tear down.
      */
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         NoopTopicFactories.getSourceFactory().destroy();
         NoopTopicFactories.getSinkFactory().destroy();
         SystemPersistenceConstants.getManager().setConfigurationDir(null);
index 9183403..fe22c9a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -39,7 +39,7 @@ import org.onap.policy.drools.legacy.config.LegacyConfigFeature;
 import org.onap.policy.drools.persistence.SystemPersistenceConstants;
 import org.onap.policy.drools.system.PolicyControllerConstants;
 
-public class RestLegacyConfigTest {
+class RestLegacyConfigTest {
 
     private static HttpClient client;
 
@@ -47,7 +47,7 @@ public class RestLegacyConfigTest {
      * Set up.
      */
     @BeforeAll
-    public static void setUp() throws Exception {
+    static void setUp() throws Exception {
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
 
         HttpServletServerFactoryInstance.getServerFactory().destroy();
@@ -81,7 +81,7 @@ public class RestLegacyConfigTest {
      * Tear down.
      */
     @AfterAll
-    public static void tearDown() {
+    static void tearDown() {
         LegacyConfigFeature.getLegacyConfig().shutdown();
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
index 9538cc4..0de170e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2021-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
 /**
  * Lifecycle FSM Test.
  */
-public class LifecycleFsmTest {
+class LifecycleFsmTest {
 
     private static final String EXAMPLE_NATIVE_CONTROLLER_POLICY_NAME = "example.controller";
     private static final String EXAMPLE_NATIVE_CONTROLLER_POLICY_JSON =
@@ -99,7 +99,7 @@ public class LifecycleFsmTest {
      * Test initialization.
      */
     @BeforeEach
-    public void beforeTest() throws CoderException, IOException {
+    void beforeTest() throws CoderException, IOException {
         LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "INFO");
         LoggerUtils.setLevel("org.onap.policy.common.endpoints", "WARN");
         LoggerUtils.setLevel("org.onap.policy.drools", "INFO");
@@ -131,7 +131,7 @@ public class LifecycleFsmTest {
     }
 
     @AfterAll
-    public static void afterClass() {
+    static void afterClass() {
         resetExecutionStats();
     }
 
index 0a9dd41..ef95a51 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2021-2022 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.
@@ -67,7 +67,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
 /**
  * Lifecycle FSM Updates Test.
  */
-public class LifecycleFsmUpdateTest {
+class LifecycleFsmUpdateTest {
 
     private static final String EXAMPLE_NATIVE_CONTROLLER_POLICY_NAME = "example.controller";
     private static final String EXAMPLE_NATIVE_CONTROLLER_POLICY_JSON =
@@ -118,7 +118,7 @@ public class LifecycleFsmUpdateTest {
      * Set up.
      */
     @BeforeAll
-    public static void setUp() throws IOException {
+    static void setUp() throws IOException {
         LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "INFO");
         LoggerUtils.setLevel("org.onap.policy.common.endpoints", "WARN");
         LoggerUtils.setLevel("org.onap.policy.drools", "INFO");
@@ -151,7 +151,7 @@ public class LifecycleFsmUpdateTest {
      * Tear Down.
      */
     @AfterAll
-    public static void tearDown() throws NoSuchFieldException, IllegalAccessException {
+    static void tearDown() throws NoSuchFieldException, IllegalAccessException {
         PolicyControllerConstants.getFactory().destroy();
 
         NoopTopicFactories.getSourceFactory().destroy();
@@ -172,7 +172,7 @@ public class LifecycleFsmUpdateTest {
      * Test initialization.
      */
     @BeforeEach
-    public void init() throws CoderException, IOException, NoSuchFieldException, IllegalAccessException {
+    void init() throws CoderException, IOException, NoSuchFieldException, IllegalAccessException {
         fsm = new LifecycleFsm() {
             @Override
             protected ScheduledExecutorService makeExecutor() {
index 81904b3..a4ccba5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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.
@@ -69,7 +69,7 @@ class LifecycleStateActivePoliciesTest extends LifecycleStateRunningTest {
      * Start tests in the Active state.
      */
     @BeforeEach
-    public void startActive() throws CoderException {
+    void startActive() throws CoderException {
         fsm = makeFsmWithPseudoTime();
 
         fsm.setStatusTimerSeconds(15);
index 80fe946..2be5ea5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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.
@@ -60,7 +60,7 @@ class LifecycleStateActiveTest extends LifecycleStateRunningTest {
      * Start tests in the Active state.
      */
     @BeforeEach
-    public void startActive() throws CoderException {
+    void startActive() throws CoderException {
         fsm = makeFsmWithPseudoTime();
 
         fsm.setStatusTimerSeconds(15);
index 67e741a..2fcbf05 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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 LifecycleStatePassiveTest extends LifecycleStateRunningTest {
      * Start tests in the Passive state.
      */
     @BeforeEach
-    public void startPassive() {
+    void startPassive() {
         /* start every test in passive mode */
         fsm = makeFsmWithPseudoTime();
         fsm.setStatusTimerSeconds(15L);
index bd7561f..81bec54 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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,17 +43,17 @@ import org.onap.policy.models.pdp.enums.PdpState;
 /**
  * Lifecycle State Terminated Tests.
  */
-public class LifecycleStateTerminatedTest {
+class LifecycleStateTerminatedTest {
     private LifecycleFsm fsm = new LifecycleFsm();
 
     @BeforeAll
-    public static void setUp() {
+    static void setUp() {
         SystemPersistenceConstants.getManager().setConfigurationDir("src/test/resources");
         LoggerUtils.setLevel("org.onap.policy.common.endpoints", "WARN");
     }
 
     @AfterAll
-    public static void tearDown() {
+    static void tearDown() {
         SystemPersistenceConstants.getManager().setConfigurationDir(null);
     }
 
index ae11fd2..dbf8352 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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.
@@ -57,7 +57,7 @@ class PolicyTypeNativeArtifactControllerTest extends LifecycleStateRunningTest {
      * Test Set initialization.
      */
     @BeforeEach
-    public void init() throws IOException, CoderException {
+    void init() throws IOException, CoderException {
         fsm = makeFsmWithPseudoTime();
         policy = getPolicyFromFile(EXAMPLE_NATIVE_DROOLS_POLICY_JSON, EXAMPLE_NATIVE_DROOLS_POLICY_NAME);
         nativePolicy = fsm.getDomainMaker().convertTo(policy, NativeArtifactPolicy.class);
index fe5a3b2..ac8a798 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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,7 +53,7 @@ class PolicyTypeNativeDroolsControllerTest extends LifecycleStateRunningTest {
      * Test initialization.
      */
     @BeforeEach
-    public void init() {
+    void init() {
         fsm = makeFsmWithPseudoTime();
     }
 
index 675d101..1554e85 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2022, 2024-2025 Nordix Foundation.
+ * Modifications Copyright (C) 2022, 2024--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.
@@ -107,7 +107,7 @@ public class RestLifecycleManagerTest {
      * Set up.
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() throws Exception {
 
         SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes");
         fsm = newFsmInstance();
@@ -158,7 +158,7 @@ public class RestLifecycleManagerTest {
      * Tear down.
      */
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         fsm.shutdown();
 
         NoopTopicFactories.getSourceFactory().destroy();
index 22f3f5d..9e1ddd4 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -40,7 +40,7 @@ import org.onap.policy.drools.core.lock.LockCallback;
 import org.onap.policy.drools.features.PolicyEngineFeatureApi;
 import org.onap.policy.drools.features.PolicyEngineFeatureApiConstants;
 
-public class NoLockManagerTest {
+class NoLockManagerTest {
 
     private static NoLockManager nlm;
     private static LockCallback callback;
@@ -49,7 +49,7 @@ public class NoLockManagerTest {
      * Set up Junits.
      */
     @BeforeAll
-    public static void setUp() {
+    static void setUp() {
         List<PolicyEngineFeatureApi> engineServices = PolicyEngineFeatureApiConstants.getProviders().getList();
         assertThat(engineServices).hasSize(1);
         nlm = (NoLockManager) engineServices.get(0);
index b487762..868ace3 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory;
  * <p>The following fields must be set before executing this: <ul> <li>SERVER</li>
  * <li>INTERNAL_TOPIC</li> <li>EXTERNAL_TOPIC</li> </ul>
  */
-public class EndToEndFeatureTest {
+class EndToEndFeatureTest {
 
     private static final Logger logger = LoggerFactory.getLogger(EndToEndFeatureTest.class);
 
@@ -149,7 +149,7 @@ public class EndToEndFeatureTest {
      *
      */
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         externalSink = TopicEndpointManager.getManager().addTopicSinks(makeSinkProperties(EXTERNAL_TOPIC)).get(0);
         externalSink.start();
 
@@ -162,7 +162,7 @@ public class EndToEndFeatureTest {
      *
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         externalSink.stop();
         internalSink.stop();
     }
@@ -171,7 +171,7 @@ public class EndToEndFeatureTest {
      * Setup.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         ctx = null;
     }
 
@@ -179,7 +179,7 @@ public class EndToEndFeatureTest {
      * Tear down.
      */
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (ctx != null) {
             ctx.destroy();
         }
@@ -191,7 +191,7 @@ public class EndToEndFeatureTest {
      */
     @Disabled
     @Test
-    public void test_SingleHost() throws Exception {    // NOSONAR
+    void test_SingleHost() throws Exception { // NOSONAR
         run(70, 1);
     }
 
@@ -201,7 +201,7 @@ public class EndToEndFeatureTest {
      */
     @Disabled
     @Test
-    public void test_TwoHosts() throws Exception {      // NOSONAR
+    void test_TwoHosts() throws Exception {      // NOSONAR
         run(200, 2);
     }
 
@@ -211,7 +211,7 @@ public class EndToEndFeatureTest {
      */
     @Disabled
     @Test
-    public void test_ThreeHosts() throws Exception {    // NOSONAR
+    void test_ThreeHosts() throws Exception {    // NOSONAR
         run(200, 3);
     }
 
index f4e7437..dede11f 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2020, 2024 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2024-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.
@@ -119,7 +119,7 @@ class FeatureTest {
      */
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         ctx = null;
     }
 
@@ -128,7 +128,7 @@ class FeatureTest {
      */
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (ctx != null) {
             ctx.destroy();
         }
@@ -269,7 +269,7 @@ class FeatureTest {
          */
 
         public void startHosts() {
-            hosts.forEach(host -> host.start());
+            hosts.forEach(Host::start);
         }
 
         /**
@@ -277,7 +277,7 @@ class FeatureTest {
          */
 
         public void stopHosts() {
-            hosts.forEach(host -> host.stop());
+            hosts.forEach(Host::stop);
         }
 
         /**
index f288767..da37967 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2020, 2024 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2024-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.
@@ -86,10 +86,9 @@ class PoolingFeatureTest {
     /**
      * Setup.
      *
-     * @throws Exception exception
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() {
         props = initProperties();
         engine = mock(PolicyEngine.class);
         controller1 = mock(PolicyController.class);
@@ -206,7 +205,7 @@ class PoolingFeatureTest {
     }
 
     @Test
-    void testBeforeStart() throws Exception {
+    void testBeforeStart() {
         assertFalse(pool.beforeStart(controller1));
         verify(mgr1).beforeStart();
 
@@ -470,17 +469,17 @@ class PoolingFeatureTest {
     }
 
     private Properties initProperties() {
-        Properties props = new Properties();
+        Properties initProps = new Properties();
 
-        initProperties(props, "A", 0);
-        initProperties(props, "B", 1);
-        initProperties(props, "Exception", 2);
+        initProperties(initProps, "A", 0);
+        initProperties(initProps, "B", 1);
+        initProperties(initProps, "Exception", 2);
 
-        props.setProperty("pooling.controllerDisabled.enabled", "false");
+        initProps.setProperty("pooling.controllerDisabled.enabled", "false");
 
-        props.setProperty("pooling.controllerException.offline.queue.limit", "INVALID NUMBER");
+        initProps.setProperty("pooling.controllerException.offline.queue.limit", "INVALID NUMBER");
 
-        return props;
+        return initProps;
     }
 
     private void initProperties(Properties props, String suffix, int offset) {
index 65b52eb..7032e92 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -109,10 +109,9 @@ class PoolingManagerImplTest {
     /**
      * Setup.
      *
-     * @throws Exception throws exception
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() {
         Properties plainProps = new Properties();
 
         poolProps = mock(PoolingProperties.class);
@@ -183,7 +182,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testGetCurrent() throws Exception {
+    void testGetCurrent() {
         assertEquals(IdleState.class, mgr.getCurrent().getClass());
 
         startMgr();
@@ -232,7 +231,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testAfterStart() throws Exception {
+    void testAfterStart() {
         startMgr();
 
         verify(topicMessageManager).startConsumer(mgr);
@@ -314,7 +313,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testAfterStop() throws Exception {
+    void testAfterStop() {
         startMgr();
         mgr.beforeStop();
 
@@ -324,7 +323,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testBeforeLock() throws Exception {
+    void testBeforeLock() {
         startMgr();
 
         mgr.beforeLock();
@@ -345,7 +344,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testAfterUnlock_AliveStarted() throws Exception {
+    void testAfterUnlock_AliveStarted() {
         startMgr();
         lockMgr();
 
@@ -355,7 +354,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testAfterUnlock_StoppedIdle() throws Exception {
+    void testAfterUnlock_StoppedIdle() {
         startMgr();
         lockMgr();
 
@@ -368,7 +367,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testAfterUnlock_StoppedStarted() throws Exception {
+    void testAfterUnlock_StoppedStarted() {
         startMgr();
 
         // Note: don't lockMgr()
@@ -382,7 +381,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testChangeState() throws Exception {
+    void testChangeState() {
         // start should invoke changeState()
         startMgr();
 
@@ -408,7 +407,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testSchedule() throws Exception {
+    void testSchedule() {
         // must start the scheduler
         startMgr();
 
@@ -436,7 +435,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testScheduleWithFixedDelay() throws Exception {
+    void testScheduleWithFixedDelay() {
         // must start the scheduler
         startMgr();
 
@@ -531,7 +530,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testBeforeOffer_Unlocked() throws Exception {
+    void testBeforeOffer_Unlocked() {
         startMgr();
 
         // route the message to another host
@@ -541,7 +540,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testBeforeOffer_Locked() throws Exception {
+    void testBeforeOffer_Locked() {
         startMgr();
         lockMgr();
 
@@ -552,7 +551,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testBeforeInsert() throws Exception {
+    void testBeforeInsert() {
         startMgr();
         lockMgr();
 
@@ -563,30 +562,25 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testHandleExternalCommInfrastructureStringStringString_NullReqId() throws Exception {
+    void testHandleExternalCommInfrastructureStringStringString_NullReqId() {
         validateHandleReqId();
     }
 
     @Test
-    void testHandleExternalCommInfrastructureStringStringString_EmptyReqId() throws Exception {
+    void testHandleExternalCommInfrastructureStringStringString_EmptyReqId() {
         validateHandleReqId();
     }
 
     @Test
-    void testHandleExternalCommInfrastructureStringStringString_InvalidMsg() throws Exception {
+    void testHandleExternalCommInfrastructureStringStringString_InvalidMsg() {
         startMgr();
 
         assertFalse(mgr.beforeInsert(TOPIC2, "invalid message"));
     }
 
     @Test
-    void testHandleExternalCommInfrastructureStringStringString() throws Exception {
-        validateUnhandled();
-    }
-
-    @Test
-    void testHandleExternalForward_NoAssignments() throws Exception {
-        validateUnhandled();
+    void testHandleExternalCommInfrastructureStringStringString() {
+        validateHandleReqId();
     }
 
     @Test
@@ -595,7 +589,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testHandleEvent_NullTarget() throws Exception {
+    void testHandleEvent_NullTarget() {
         // buckets have null targets
         validateDiscarded(new BucketAssignments(new String[] {null, null}));
     }
@@ -606,13 +600,13 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testHandleEvent_DiffHost() throws Exception {
+    void testHandleEvent_DiffHost() {
         // route the message to the *OTHER* host
         validateDiscarded(makeAssignments(false));
     }
 
     @Test
-    void testDecodeEvent_CannotDecode() throws Exception {
+    void testDecodeEvent_CannotDecode() {
 
         mgr = new PoolingManagerTest(MY_HOST, controller, poolProps, active) {
             @Override
@@ -632,7 +626,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testDecodeEvent_UnsuppEx() throws Exception {
+    void testDecodeEvent_UnsuppEx() {
 
         // generate exception
         mgr = new PoolingManagerTest(MY_HOST, controller, poolProps, active) {
@@ -653,7 +647,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testDecodeEvent_ArgEx() throws Exception {
+    void testDecodeEvent_ArgEx() {
         // generate exception
         mgr = new PoolingManagerTest(MY_HOST, controller, poolProps, active) {
             @Override
@@ -673,7 +667,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testDecodeEvent_StateEx() throws Exception {
+    void testDecodeEvent_StateEx() {
         // generate exception
         mgr = new PoolingManagerTest(MY_HOST, controller, poolProps, active) {
             @Override
@@ -693,7 +687,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testDecodeEvent() throws Exception {
+    void testDecodeEvent() {
         startMgr();
 
         when(controller.isLocked()).thenReturn(true);
@@ -705,26 +699,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testHandleInternal() throws Exception {
-        startMgr();
-
-        StartState st = (StartState) mgr.getCurrent();
-
-        /*
-         * give it its heart beat, that should cause it to transition to the Query state.
-         */
-        Heartbeat hb = new Heartbeat(mgr.getHost(), st.getHbTimestampMs());
-        hb.setChannel(Message.ADMIN);
-
-        String msg = ser.encodeMsg(hb);
-
-        mgr.onTopicEvent(CommInfrastructure.KAFKA, MY_TOPIC, msg);
-
-        assertInstanceOf(QueryState.class, mgr.getCurrent());
-    }
-
-    @Test
-    void testHandleInternal_IoEx() throws Exception {
+    void testHandleInternal_IoEx() {
         startMgr();
 
         mgr.onTopicEvent(CommInfrastructure.KAFKA, MY_TOPIC, "invalid message");
@@ -733,7 +708,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testHandleInternal_PoolEx() throws Exception {
+    void testHandleInternal_PoolEx() {
         startMgr();
 
         StartState st = (StartState) mgr.getCurrent();
@@ -814,7 +789,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testTimerActionRun() throws Exception {
+    void testTimerActionRun() {
         // must start the scheduler
         startMgr();
 
@@ -837,7 +812,7 @@ class PoolingManagerImplTest {
     }
 
     @Test
-    void testTimerActionRun_DiffState() throws Exception {
+    void testTimerActionRun_DiffState() {
         // must start the scheduler
         startMgr();
 
@@ -888,12 +863,7 @@ class PoolingManagerImplTest {
         verify(topicMessageManager, times(START_PUB)).publish(any());
     }
 
-    private void validateUnhandled() {
-        startMgr();
-        assertFalse(mgr.beforeInsert(TOPIC2, DECODED_EVENT));
-    }
-
-    private void validateDiscarded(BucketAssignments bucketAssignments) throws PoolingFeatureException {
+    private void validateDiscarded(BucketAssignments bucketAssignments) {
         startMgr();
 
         // buckets have null targets
@@ -952,7 +922,7 @@ class PoolingManagerImplTest {
     /**
      * Used to create a mock object that implements both super interfaces.
      */
-    private static interface ListeningController extends TopicListener, PolicyController {
+    private interface ListeningController extends TopicListener, PolicyController {
 
     }
 
index 383e007..8b47a18 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -65,7 +65,7 @@ public class PoolingPropertiesTest {
      * @throws Exception throws an exception
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() throws Exception {
         plain = makeProperties();
 
         pooling = new PoolingProperties(CONTROLLER, plain);
index 82fe3a8..336f389 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 TopicMessageManagerTest {
      * @throws Exception throws an exception
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() throws Exception {
         listener = mock(TopicListener.class);
         source = mock(TopicSource.class);
         gotSources = false;
index dced372..a7d4bd2 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -31,7 +31,7 @@ class IdentificationTest extends SupportMessageWithAssignmentsTester<Identificat
     }
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         setNullAssignments(false);
     }
 
index 15d9d33..30dcafb 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -31,7 +31,7 @@ class LeaderTest extends SupportMessageWithAssignmentsTester<Leader> {
     }
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         setNullAssignments(false);
     }
 
index cf2cb69..2e45d03 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -61,10 +61,10 @@ class MessageTest extends SupportBasicMessageTester<Message> {
     @Test
     void testCheckValidity_InvalidFields() {
         // null or empty source
-        expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setSource(value));
+        expectCheckValidityFailure_NullOrEmpty(Message::setSource);
 
         // null or empty channel
-        expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setChannel(value));
+        expectCheckValidityFailure_NullOrEmpty(Message::setChannel);
     }
 
     /**
index 51e2773..f50d30a 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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,6 +44,7 @@ class IdleStateTest extends SupportBasicStateTester {
     /**
      * Setup.
      */
+    @Override
     @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
index dbac761..d67b0c8 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -51,6 +51,7 @@ class ProcessingStateTest extends SupportBasicStateTester {
     /**
      * Setup.
      */
+    @Override
     @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
index cfae6f3..bc1b729 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -50,6 +50,7 @@ class StateTest extends SupportBasicStateTester {
     /**
      * Setup.
      */
+    @Override
     @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
@@ -84,7 +85,7 @@ class StateTest extends SupportBasicStateTester {
         int initDelay = 200;
 
         /*
-         * Create three tasks tasks.
+         * Create three tasks.
          */
 
         StateTimerTask task1 = mock(StateTimerTask.class);
index f567c59..bd7f2f9 100644 (file)
@@ -3,7 +3,7 @@
  * feature-test-transaction
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -78,7 +78,7 @@ class TestTransactionAdditionalTest {
      * Initialize objects for each test.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         theThread = mock(Thread.class);
         controller = mock(PolicyController.class);
         controller2 = mock(PolicyController.class);
index a7b213b..8f93efc 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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,19 +41,19 @@ class TestTransactionFeatureTest {
     private AtomicInteger unregCount;
     private TestTransaction mgr;
     private DroolsController drools;
-    private PolicyController ctlr;
+    private PolicyController controller;
     private TestTransactionFeature feat;
 
     /**
      * Initialize objects for each test.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         regCount = new AtomicInteger(0);
         unregCount = new AtomicInteger(0);
         mgr = mock(TestTransaction.class);
         drools = mock(DroolsController.class);
-        ctlr = mock(PolicyController.class);
+        controller = mock(PolicyController.class);
 
         feat = new TestTransactionFeature() {
             @Override
@@ -62,17 +62,17 @@ class TestTransactionFeatureTest {
             }
         };
 
-        when(ctlr.getDrools()).thenReturn(drools);
+        when(controller.getDrools()).thenReturn(drools);
 
         doAnswer(args -> {
             regCount.incrementAndGet();
             return null;
-        }).when(mgr).register(ctlr);
+        }).when(mgr).register(controller);
 
         doAnswer(args -> {
             unregCount.incrementAndGet();
             return null;
-        }).when(mgr).unregister(ctlr);
+        }).when(mgr).unregister(controller);
     }
 
     @Test
@@ -114,53 +114,53 @@ class TestTransactionFeatureTest {
      * @param method method to invoke
      */
     private void checkCombos(AtomicInteger counter, Function<PolicyController, Boolean> method) {
-        when(ctlr.isAlive()).thenReturn(true);
-        when(ctlr.isLocked()).thenReturn(true);
+        when(controller.isAlive()).thenReturn(true);
+        when(controller.isLocked()).thenReturn(true);
         when(drools.isBrained()).thenReturn(true);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(true);
-        when(ctlr.isLocked()).thenReturn(true);
+        when(controller.isAlive()).thenReturn(true);
+        when(controller.isLocked()).thenReturn(true);
         when(drools.isBrained()).thenReturn(false);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
         // this is the only one that should cause it to register
-        when(ctlr.isAlive()).thenReturn(true);
-        when(ctlr.isLocked()).thenReturn(false);
+        when(controller.isAlive()).thenReturn(true);
+        when(controller.isLocked()).thenReturn(false);
         when(drools.isBrained()).thenReturn(true);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(1, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(true);
-        when(ctlr.isLocked()).thenReturn(false);
+        when(controller.isAlive()).thenReturn(true);
+        when(controller.isLocked()).thenReturn(false);
         when(drools.isBrained()).thenReturn(false);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(false);
-        when(ctlr.isLocked()).thenReturn(true);
+        when(controller.isAlive()).thenReturn(false);
+        when(controller.isLocked()).thenReturn(true);
         when(drools.isBrained()).thenReturn(true);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(false);
-        when(ctlr.isLocked()).thenReturn(true);
+        when(controller.isAlive()).thenReturn(false);
+        when(controller.isLocked()).thenReturn(true);
         when(drools.isBrained()).thenReturn(false);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(false);
-        when(ctlr.isLocked()).thenReturn(false);
+        when(controller.isAlive()).thenReturn(false);
+        when(controller.isLocked()).thenReturn(false);
         when(drools.isBrained()).thenReturn(true);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(false);
-        when(ctlr.isLocked()).thenReturn(false);
+        when(controller.isAlive()).thenReturn(false);
+        when(controller.isLocked()).thenReturn(false);
         when(drools.isBrained()).thenReturn(false);
-        assertFalse(method.apply(ctlr));
+        assertFalse(method.apply(controller));
         assertEquals(0, counter.getAndSet(0));
     }
 
@@ -171,12 +171,12 @@ class TestTransactionFeatureTest {
      * @param method method to invoke
      */
     private void checkSimple(AtomicInteger counter, Function<PolicyController, Boolean> method) {
-        when(ctlr.isAlive()).thenReturn(true);
-        assertFalse(method.apply(ctlr));
+        when(controller.isAlive()).thenReturn(true);
+        assertFalse(method.apply(controller));
         assertEquals(1, counter.getAndSet(0));
 
-        when(ctlr.isAlive()).thenReturn(false);
-        assertFalse(method.apply(ctlr));
+        when(controller.isAlive()).thenReturn(false);
+        assertFalse(method.apply(controller));
         assertEquals(1, counter.getAndSet(0));
     }
 }
index a1fd273..65174ba 100644 (file)
@@ -3,7 +3,7 @@
  * feature-test-transaction
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
 
 package org.onap.policy.drools.testtransaction;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
-import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -61,7 +59,7 @@ public class TestTransactionTest {
      *
      */
     @BeforeAll
-    public static void startUp() {
+    static void startUp() {
         logger.info("enter");
 
         cleanUpWorkingDir();
index d6804b6..42e6b57 100644 (file)
@@ -3,7 +3,7 @@
  * policy-core
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ import org.onap.policy.drools.util.KieUtils;
  *     PolicySession
  *     PolicySessionFeatureAPI
  */
-public class DroolsContainerTest {
+class DroolsContainerTest {
 
     private static final long TIMEOUT_SEC = 5;
 
@@ -58,7 +58,7 @@ public class DroolsContainerTest {
      * version.
      */
     @BeforeAll
-    public static void setUp() throws Exception {
+    static void setUp() throws Exception {
         KieUtils.installArtifact(
                 Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
                 Paths.get("src/test/resources/drools-artifact-1.1/pom.xml").toFile(),
index 6f07a34..da546a4 100644 (file)
@@ -51,7 +51,7 @@ class PolicySessionTest {
      * Initialize test objects.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         container = mock(PolicyContainer.class);
         kie = mock(KieSession.class);
 
index 6bd994b..b1979dd 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -33,7 +33,7 @@ class PdpJmxTest {
     private PdpJmx jmx;
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         jmx = new PdpJmx();
     }
 
index 02c3fea..bde37f0 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 class AlwaysFailLockTest extends AlwaysLockBaseTest<AlwaysFailLock> {
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         callback = mock(LockCallback.class);
         lock = new AlwaysFailLock(RESOURCE, OWNER_KEY, HOLD_SEC, callback);
     }
index 0104d0a..eee9163 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
 class AlwaysSuccessLockTest extends AlwaysLockBaseTest<AlwaysSuccessLock> {
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         callback = mock(LockCallback.class);
         lock = new AlwaysSuccessLock(RESOURCE, OWNER_KEY, HOLD_SEC, callback);
     }
index f16d9c4..b36cf96 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 LockImplTest {
      * Populates {@link #lock}.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         callback = mock(LockCallback.class);
 
         lock = new LockImpl(STATE, RESOURCE, OWNER_KEY, HOLD_SEC, callback);
index 7089fda..2c6f6c5 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ import org.kie.api.runtime.KieSession;
 /**
  * Kie Utils Tests.
  */
-public class KieUtilsTest {
+class KieUtilsTest {
 
     private static KieContainer container;
     private static KieSession session;
@@ -53,7 +53,7 @@ public class KieUtilsTest {
      * Test class initialization.
      */
     @BeforeAll
-    public static void createArtifact() throws Exception {
+    static void createArtifact() throws Exception {
         ReleaseId releaseId =
             KieUtils.installArtifact(
                 Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
index dc6212b..a7773e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020,2022 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ *  Modifications Copyright (C) 2021, 2024-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 DomainPolicyTypesTest {
     private StandardCoder nonValCoder;
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         domainMaker = new DomainMaker();
         nonValCoder = new StandardCoder();
     }
index 8168e75..c1e283a 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024-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 OperationalPolicyTest {
     private StandardCoder nonValCoder;
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         domainMaker = new DomainMaker();
         nonValCoder = new StandardCoder();
     }
index 877489d..5e24c2b 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-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.
@@ -195,7 +195,7 @@ class MavenDroolsController2Test {
      * Initializes objects, including the drools controller.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         autoCloseable = MockitoAnnotations.openMocks(this);
         lenient().when(droolsProviders.getList()).thenReturn(List.of(prov1, prov2));
 
index fbaf843..20bba50 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ public class MavenDroolsControllerTest {
      * @throws IOException throws an IO exception
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws IOException {
+    static void setUpBeforeClass() throws IOException {
         releaseId =
             KieUtils.installArtifact(Paths.get(JUNIT_ECHO_KMODULE_PATH).toFile(),
                 Paths.get(JUNIT_ECHO_KMODULE_POM_PATH).toFile(),
@@ -63,7 +63,7 @@ public class MavenDroolsControllerTest {
     }
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         running = new CountDownLatch(1);
     }
 
index 753296a..3b7ee34 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ public class MavenDroolsControllerUpgradesTest {
      * Test Class Initialization.
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws IOException {
+    static void setUpBeforeClass() throws IOException {
         Path path = Paths.get(DROOLS_RESOURCES_DIR + "rules1" + DRL_EXT);
         rulesDescriptor1 =
             install("rules1",
@@ -116,7 +116,7 @@ public class MavenDroolsControllerUpgradesTest {
      * Creates a controller before each test.
      */
     @BeforeEach
-    public void beforeTest() {
+    void beforeTest() {
         controller =
             new MavenDroolsController(
                 rulesDescriptor1.getGroupId(), rulesDescriptor1.getArtifactId(), rulesDescriptor1.getVersion(),
@@ -127,7 +127,7 @@ public class MavenDroolsControllerUpgradesTest {
      * Shuts down the controller after each test.
      */
     @AfterEach
-    public void afterTest() {
+    void afterTest() {
         if (controller != null) {
             controller.halt();
         }
index b6a9ce5..8516327 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ import org.onap.policy.drools.properties.DroolsPropertyConstants;
  * (File) System Persistence Tests.
  */
 @TestMethodOrder(MethodOrderer.MethodName.class)
-public class SystemPersistenceTest {
+class SystemPersistenceTest {
     /**
      * sample configuration dir.
      */
@@ -126,12 +126,12 @@ public class SystemPersistenceTest {
     private static final String SYSTEM_PROPS_FILE =  SYSTEM_PROPS + "-system.properties";
 
     @BeforeAll
-    public static void setUp() throws IOException {
+    static void setUp() throws IOException {
         cleanUpWorkingDirs();
     }
 
     @AfterAll
-    public static void tearDown() throws IOException {
+    static void tearDown() throws IOException {
         cleanUpWorkingDirs();
     }
 
index 4df04d9..aa8c030 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ public class ProtocolCoderToolsetTest {
      * Test Class Initialization.
      */
     @BeforeAll
-    public static void setUpClass() throws IOException {
+    static void setUpClass() throws IOException {
         releaseId = KieUtils.installArtifact(Paths.get(MavenDroolsControllerTest.JUNIT_ECHO_KMODULE_PATH).toFile(),
             Paths.get(MavenDroolsControllerTest.JUNIT_ECHO_KMODULE_POM_PATH).toFile(),
             MavenDroolsControllerTest.JUNIT_ECHO_KJAR_DRL_PATH,
@@ -96,7 +96,7 @@ public class ProtocolCoderToolsetTest {
      * Test Set Up.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         controller = createController();
     }
 
@@ -104,7 +104,7 @@ public class ProtocolCoderToolsetTest {
      * Test Termination.
      */
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         if (controller != null) {
             DroolsControllerConstants.getFactory().destroy(controller);
         }
index cb92b2e..d8ffeff 100644 (file)
@@ -3,7 +3,7 @@
  * policy-management
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -70,7 +70,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @TestMethodOrder(MethodOrderer.DisplayName.class)
-public class RestManagerTest {
+class RestManagerTest {
     private static final int DEFAULT_TELEMETRY_PORT = 7887;
     private static final String HOST = "localhost";
     private static final String REST_MANAGER_PATH = "/policy/pdp";
@@ -101,7 +101,7 @@ public class RestManagerTest {
      * @throws IOException throws an IO exception
      */
     @BeforeAll
-    public static void setUp() throws IOException, InterruptedException {
+    static void setUp() throws IOException, InterruptedException {
         cleanUpWorkingDirs();
 
         SystemPersistenceConstants.getManager().setConfigurationDir(null);
@@ -158,7 +158,7 @@ public class RestManagerTest {
      * @throws IOException IO exception
      */
     @AfterAll
-    public static void tearDown() throws IOException {
+    static void tearDown() throws IOException {
         try {
             client.close();
         } catch (IOException ex) {
index 8a388df..2af4956 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 PolicyControllerFactoryTest {
      * Initializes the object to be tested.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         controller = mock(PolicyController.class);
         controller2 = mock(PolicyController.class);
         properties = new Properties();
index 63a96b0..857154d 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2022 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2025 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.
@@ -163,7 +163,7 @@ class PolicyEngineManagerTest {
      * @throws Exception if an error occurs
      */
     @BeforeEach
-    public void setUp() throws Exception {
+    void setUp() throws Exception {
         registry = PrometheusRegistry.defaultRegistry;
         registry.clear();
         properties = new Properties();
@@ -330,7 +330,7 @@ class PolicyEngineManagerTest {
     }
 
     @AfterEach
-    public void tearDown() {
+    void tearDown() {
         PrometheusRegistry.defaultRegistry.clear();
     }
 
@@ -1411,7 +1411,7 @@ class PolicyEngineManagerTest {
     }
 
     @Test
-    public void testTransaction() {
+    void testTransaction() {
         mgr.metric(CONTROLLER1, POLICY, new Metric());
         assertEquals(0, mgr.getStats().getGroupStat().getPolicyExecutedCount());
         assertEquals(0, mgr.getStats().getSubgroupStats().size());
index 02774e1..d7c60b3 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 AggregatedPolicyControllerTest {
      * Initializes the object to be tested.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         properties = new Properties();
 
         source1 = mock(TopicSource.class);
index 47d0f27..bf5cb6c 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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.
@@ -64,7 +64,7 @@ class LockManagerTest {
      * Resets fields and creates {@link #mgr}.
      */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         closeable = MockitoAnnotations.openMocks(this);
 
         doAnswer(args -> {
@@ -76,7 +76,7 @@ class LockManagerTest {
     }
 
     @AfterEach
-    public void tearDown() throws Exception {
+    void tearDown() throws Exception {
         closeable.close();
     }
 
index 8fbf237..8b577b3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2021, 2024 Nordix Foundation.
+ *  Modifications Copyright (C) 2021, 2024-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 DomainMakerTest {
     private DomainMaker domainMaker;
 
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         domainMaker = new DomainMaker();
     }
 
index 43f537e..e36dab5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2024 Nordix Foundation
+ *  Modifications Copyright (C) 2024-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.
@@ -64,7 +64,7 @@ class StandardValCoderTest {
     }
 
     @BeforeEach
-    public void testSetUp() {
+    void testSetUp() {
         jsonSchema = getJson("src/test/resources/coder/test.schema.json");
         validJson = getJson("src/test/resources/coder/valid.json");
         missingReqJson = getJson("src/test/resources/coder/missing-required.json");
index bec2223..4a5441a 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2024 Nordix Foundation.
+ * Modifications Copyright (C) 2024-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 @@ import org.onap.policy.common.utils.security.CryptoUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class PropertyUtilTest {
+class PropertyUtilTest {
     /*
      * Note: to generate the encrypted values, invoke CryptoUtils passing both the value
      * to be encrypted and the crypto key.
@@ -90,7 +90,7 @@ public class PropertyUtilTest {
      * Test Setup -- Create a directory for temporary files.
      */
     @BeforeAll
-    public static void setup() {
+    static void setup() {
         logger.info("setup: creating a temporary directory");
 
         // create a directory for temporary files
@@ -103,7 +103,7 @@ public class PropertyUtilTest {
      * Test Cleanup -- Remove temporary files.
      */
     @AfterAll
-    public static void teardown() {
+    static void teardown() {
         logger.info("teardown: remove the temporary directory");
 
         // the assumption is that we only have one level of temporary files
diff --git a/pom.xml b/pom.xml
index 951fb44..bdedaf6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
             <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>
 
     <dependencyManagement>