Fix references and organize dependencies in policy-drools after 68/139368/2
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 4 Nov 2024 13:48:17 +0000 (13:48 +0000)
committeradheli.tavares <adheli.tavares@est.tech>
Mon, 11 Nov 2024 10:04:13 +0000 (10:04 +0000)
splitting policy-endpoints and message-bus in policy-common

Issue-ID: POLICY-5131
Change-Id: Ia10b2e1860c5300fcf4953d105901f920af88576
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
17 files changed:
controlloop/common/controller-usecases/pom.xml
controlloop/common/coordination/pom.xml
controlloop/common/eventmanager/pom.xml
controlloop/common/feature-controlloop-management/pom.xml
controlloop/common/feature-controlloop-trans/pom.xml
controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeature.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/feature-controlloop-usecases/pom.xml
controlloop/common/feature-controlloop-utils/pom.xml
controlloop/common/pom.xml
controlloop/common/rules-test/pom.xml
controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Listener.java
controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Topics.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/TopicsTest.java
pom.xml

index e5443eb..3547aaf 100644 (file)
             <artifactId>drools-model-compiler</artifactId>
             <version>${version.drools}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <profiles>
index 51e02d9..9b0f21b 100644 (file)
@@ -4,7 +4,7 @@
   ================================================================================
   Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2020 Bell Canada.
-  Modifications Copyright (C) 2023 Nordix Foundation.
+  Modifications Copyright (C) 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <version>${version.policy.drools-pdp}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
     </dependencies>
 </project>
index c67021c..e576be9 100644 (file)
 
     <dependencies>
         <dependency>
-            <groupId>org.hibernate.orm</groupId>
-            <artifactId>hibernate-core</artifactId>
+            <groupId>org.onap.policy.drools-pdp</groupId>
+            <artifactId>policy-core</artifactId>
+            <version>${version.policy.drools-pdp}</version>
         </dependency>
         <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.drools-pdp</groupId>
+            <artifactId>policy-utils</artifactId>
+            <version>${version.policy.drools-pdp}</version>
         </dependency>
         <dependency>
-            <!-- less than 1.9.4 has security vulnerabilities -->
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
+            <groupId>org.onap.policy.drools-pdp</groupId>
+            <artifactId>policy-management</artifactId>
+            <version>${version.policy.drools-pdp}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.drools-pdp</groupId>
+            <artifactId>policy-domains</artifactId>
+            <version>${version.policy.drools-pdp}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models</groupId>
+            <artifactId>policy-models-decisions</artifactId>
+            <version>${policy.models.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models</groupId>
+            <artifactId>policy-models-examples</artifactId>
+            <version>${policy.models.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models</groupId>
+            <artifactId>policy-models-tosca</artifactId>
+            <version>${policy.models.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
             <artifactId>blueprint-proto</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>aai</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models</groupId>
-            <artifactId>policy-models-decisions</artifactId>
+            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+            <artifactId>simulators</artifactId>
             <version>${policy.models.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.httpcomponents.client5</groupId>
-            <artifactId>httpclient5</artifactId>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${version.policy.common}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>policy-endpoints</artifactId>
             <version>${version.policy.common}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.policy.drools-pdp</groupId>
-            <artifactId>policy-management</artifactId>
-            <version>${version.policy.drools-pdp}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.drools-pdp</groupId>
-            <artifactId>policy-domains</artifactId>
-            <version>${version.policy.drools-pdp}</version>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${version.policy.common}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
-            <artifactId>simulators</artifactId>
-            <version>${policy.models.version}</version>
-            <scope>test</scope>
+            <groupId>org.hibernate.orm</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models</groupId>
-            <artifactId>policy-models-examples</artifactId>
-            <version>${policy.models.version}</version>
-            <scope>test</scope>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.openpojo</groupId>
+            <artifactId>openpojo</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.drools</groupId>
+            <artifactId>drools-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.kie</groupId>
+            <artifactId>kie-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
     </dependencies>
 </project>
index a2e6a60..537c3fb 100644 (file)
@@ -3,7 +3,7 @@
   ONAP
   ================================================================================
   Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019,2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   Modifications Copyright (C) 2020 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
             <version>${policy.models.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
index fb72730..9fe73dc 100644 (file)
@@ -3,7 +3,7 @@
   ONAP
   ================================================================================
   Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019,2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   Modifications Copyright (C) 2020 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
             <artifactId>guava</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
index 26627eb..f3235ba 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +21,7 @@
 
 package org.onap.policy.drools.apps.controlloop.feature.trans;
 
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.controlloop.VirtualControlLoopNotification;
 import org.onap.policy.drools.features.PolicyControllerFeatureApi;
 import org.onap.policy.drools.system.PolicyController;
index 164cdb7..a165f35 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 import org.onap.policy.controlloop.ControlLoopNotificationType;
 import org.onap.policy.controlloop.VirtualControlLoopNotification;
index ac73f93..19d09e0 100644 (file)
@@ -33,11 +33,11 @@ import java.util.List;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClient;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.message.bus.event.Topic;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.common.utils.network.NetworkUtil;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 import org.onap.policy.controlloop.VirtualControlLoopNotification;
@@ -96,14 +96,14 @@ class RestTransactionTrackerTest {
         equals(get("cacheSize", Response.Status.OK.getStatusCode()), Integer.class, 3);
         equals(get("timeout", Response.Status.OK.getStatusCode()), Integer.class, 2);
 
-        put("cacheSize/10", "", Response.Status.OK.getStatusCode());
-        put("timeout/20", "", Response.Status.OK.getStatusCode());
+        put("cacheSize/10", Response.Status.OK.getStatusCode());
+        put("timeout/20", Response.Status.OK.getStatusCode());
 
         equals(get("cacheSize", Response.Status.OK.getStatusCode()), Integer.class, 10);
         equals(get("timeout", Response.Status.OK.getStatusCode()), Integer.class, 20);
 
-        put("cacheSize/3", "", Response.Status.OK.getStatusCode());
-        put("timeout/2", "", Response.Status.OK.getStatusCode());
+        put("cacheSize/3", Response.Status.OK.getStatusCode());
+        put("timeout/2", Response.Status.OK.getStatusCode());
 
         equals(get("cacheSize", Response.Status.OK.getStatusCode()), Integer.class, 3);
         equals(get("timeout", Response.Status.OK.getStatusCode()), Integer.class, 2);
@@ -127,30 +127,31 @@ class RestTransactionTrackerTest {
 
         assertFalse(HttpClient.getBody(get("/inprogress", Response.Status.OK.getStatusCode()),
                 List.class).isEmpty());
-        notNull(get("/inprogress/664be3d2-6c12-4f4b-a3e7-c349acced200", Response.Status.OK.getStatusCode()),
-                String.class);
+        notNull(get("/inprogress/664be3d2-6c12-4f4b-a3e7-c349acced200", Response.Status.OK.getStatusCode())
+        );
     }
 
     private Response get(String contextPath, int statusCode) {
         var response = client.get(contextPath);
-        return checkResponse(statusCode, response);
+        checkResponse(statusCode, response);
+        return response;
     }
 
-    private Response put(String contextPath, String body, int statusCode) {
-        var response = client.put(contextPath, Entity.json(body), Collections.emptyMap());
-        return checkResponse(statusCode, response);
+    private void put(String contextPath, int statusCode) {
+        var response = client.put(contextPath, Entity.json(""), Collections.emptyMap());
+        checkResponse(statusCode, response);
+        response.close();
     }
 
     private <T, Y> void equals(Response response, Class<T> clazz, Y expected) {
         assertEquals(expected, HttpClient.getBody(response, clazz));
     }
 
-    private <T> void notNull(Response response, Class<T> clazz) {
-        assertNotNull(HttpClient.getBody(response, clazz));
+    private <T> void notNull(Response response) {
+        assertNotNull(HttpClient.getBody(response, (Class<T>) String.class));
     }
 
-    private Response checkResponse(int statusCode, Response response) {
+    private void checkResponse(int statusCode, Response response) {
         assertEquals(statusCode, response.getStatus());
-        return response;
     }
 }
\ No newline at end of file
index d3ea3e3..629d261 100644 (file)
@@ -4,7 +4,7 @@
   ================================================================================
   Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2020 Bell Canada.
-  Modifications Copyright (C) 2023 Nordix Foundation.
+  Modifications Copyright (C) 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <version>${version.policy.drools-pdp}</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
index ad9a296..c5805ab 100644 (file)
@@ -3,15 +3,15 @@
   ONAP
   ================================================================================
   Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   Modifications Copyright (C) 2020 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
-  
+
        http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
index ab8cb93..f9b7392 100644 (file)
@@ -4,7 +4,7 @@
     ================================================================================
     Copyright (C) 2017, 2019-2020 AT&T Intellectual Property. All rights reserved.
     Modifications Copyright (C) 2020 Bell Canada.
-    Modifications Copyright (C) 2023 Nordix Foundation.
+    Modifications Copyright (C) 2023-2024 Nordix Foundation.
     ================================================================================
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
         <module>feature-controlloop-usecases</module>
     </modules>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.kie</groupId>
+            <artifactId>kie-ci</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
 </project>
index 2b94549..947f295 100644 (file)
             <version>${policy.models.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${version.policy.common}</version>
+        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
index 5110fe7..0f917ca 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,11 +27,11 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Function;
 import java.util.function.Predicate;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.TopicListener;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicEndpoint;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.TopicListener;
+import org.onap.policy.common.message.bus.event.TopicSink;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 051270f..c7a339d 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,8 +26,8 @@ import java.io.IOException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.function.Function;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.TopicEndpoint;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.resources.ResourceUtils;
index ed30515..614e768 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-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,11 +39,11 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.bus.NoopTopicSink;
-import org.onap.policy.common.endpoints.parameters.TopicParameters;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicEndpoint;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.noop.NoopTopicSink;
+import org.onap.policy.common.parameters.topic.TopicParameters;
 
 class ListenerTest {
     private static final String EXPECTED_EXCEPTION = "expected exception";
@@ -139,7 +139,7 @@ class ListenerTest {
      */
     @Test
     void testAwaitLongTimeUnitPredicateInterrupted() throws InterruptedException {
-        listener = new Listener<String>(MY_TOPIC, msg -> msg) {
+        listener = new Listener<>(MY_TOPIC, msg -> msg) {
             @Override
             protected String pollMessage(long remainingMs) throws InterruptedException {
                 throw new InterruptedException(EXPECTED_EXCEPTION);
@@ -149,20 +149,17 @@ class ListenerTest {
         AtomicReference<TopicException> exref = new AtomicReference<>();
         var interrupted = new CountDownLatch(1);
 
-        var thread = new Thread() {
-            @Override
-            public void run() {
-                try {
-                    listener.await();
-                } catch (TopicException e) {
-                    exref.set(e);
-                }
-
-                if (Thread.currentThread().isInterrupted()) {
-                    interrupted.countDown();
-                }
+        var thread = new Thread(() -> {
+            try {
+                listener.await();
+            } catch (TopicException e) {
+                exref.set(e);
             }
-        };
+
+            if (Thread.currentThread().isInterrupted()) {
+                interrupted.countDown();
+            }
+        });
 
         thread.start();
         assertTrue(interrupted.await(5, TimeUnit.SECONDS));
index 9bf0d22..0033561 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-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,12 +39,12 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.bus.NoopTopicSink;
-import org.onap.policy.common.endpoints.event.comm.bus.NoopTopicSource;
-import org.onap.policy.common.endpoints.parameters.TopicParameters;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicEndpoint;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.noop.NoopTopicSink;
+import org.onap.policy.common.message.bus.event.noop.NoopTopicSource;
+import org.onap.policy.common.parameters.topic.TopicParameters;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.drools.controller.DroolsController;
diff --git a/pom.xml b/pom.xml
index 5da6c94..48e332a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         </plugins>
     </reporting>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.kie</groupId>
-            <artifactId>kie-ci</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-engine</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.awaitility</groupId>
-            <artifactId>awaitility</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- Swagger v3 annotations -->
-        <dependency>
-            <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-annotations</artifactId>
-        </dependency>
-    </dependencies>
 </project>