aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-07-05 10:52:20 -0400
committerJim Hahn <jrh3@att.com>2019-07-05 12:25:00 -0400
commite173fc5ab13b095d8f70fd8a8d4d063adeba6e6b (patch)
tree8e63717c99cfe9f52f905974c8c67fb8a1dece29 /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java
parent53f9550501ca1854318c1f552b0aba2e255b6748 (diff)
Fix sonar issues in policy/endpoints
Sonar fixes, other than code coverage. These changes are disruptive and will likely cause breakage in a number of policy repos. Renamed constants. Moved constants/factories from interfaces to classes. Change-Id: I182d50320aa6b53e383081af806c60dd2f806cbe Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java
index 07630cd4..e30f38a7 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/client/TopicSinkClientTest.java
@@ -38,7 +38,7 @@ import java.util.concurrent.atomic.AtomicReference;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
-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.TopicSink;
public class TopicSinkClientTest {
@@ -66,14 +66,14 @@ public class TopicSinkClientTest {
props.setProperty("noop.sink.topics", TOPIC);
// clear all topics and then configure one topic
- TopicEndpoint.manager.shutdown();
- TopicEndpoint.manager.addTopicSinks(props);
+ TopicEndpointManager.getManager().shutdown();
+ TopicEndpointManager.getManager().addTopicSinks(props);
}
@AfterClass
public static void tearDown() {
// clear all topics after the tests
- TopicEndpoint.manager.shutdown();
+ TopicEndpointManager.getManager().shutdown();
}
/**
@@ -82,7 +82,7 @@ public class TopicSinkClientTest {
@Test
public void testGetTopicSinks() throws Exception {
- sink = TopicEndpoint.manager.getNoopTopicSink(TOPIC);
+ sink = TopicEndpointManager.getManager().getNoopTopicSink(TOPIC);
assertNotNull(sink);
final AtomicReference<String> evref = new AtomicReference<>(null);
@@ -106,7 +106,7 @@ public class TopicSinkClientTest {
@Test
public void testTopicSinkClient_GetTopic() throws TopicSinkClientException {
- assertEquals(TOPIC, new TopicSinkClient(TopicEndpoint.manager.getNoopTopicSink(TOPIC)).getTopic());
+ assertEquals(TOPIC, new TopicSinkClient(TopicEndpointManager.getManager().getNoopTopicSink(TOPIC)).getTopic());
assertEquals(TOPIC, new TopicSinkClient(TOPIC).getTopic());
assertThatThrownBy(() -> new TopicSinkClient((TopicSink) null)).isInstanceOf(IllegalArgumentException.class);