aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints/src/test')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java18
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSourceTest.java17
2 files changed, 1 insertions, 34 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java
index 5264b2f4..82d5eef8 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java
@@ -100,23 +100,7 @@ public class BusConsumerTest extends TopicTestBase {
@Test
public void testCambriaConsumerWrapperClose() {
CambriaConsumerWrapper cons = new CambriaConsumerWrapper(builder.build());
-
- // set filter several times to cause different branches of close() to be executed
- for (int count = 0; count < 3; ++count) {
- cons.close();
- final int count2 = count;
- assertThatCode(() -> cons.setFilter("close=" + count2)).doesNotThrowAnyException();
- }
- }
-
- @Test
- public void testCambriaConsumerWrapperSetFilter() {
- // set filter several times to cause different branches to be executed
- CambriaConsumerWrapper cons = new CambriaConsumerWrapper(builder.build());
- for (int count = 0; count < 3; ++count) {
- final int count2 = count;
- assertThatCode(() -> cons.setFilter("set-filter=" + count2)).doesNotThrowAnyException();
- }
+ assertThatCode(() -> cons.close()).doesNotThrowAnyException();
}
@Test
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSourceTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSourceTest.java
index 1e95924d..1a5506de 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSourceTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSourceTest.java
@@ -43,7 +43,6 @@ import org.mockito.stubbing.Answer;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicListener;
import org.onap.policy.common.endpoints.event.comm.bus.TopicTestBase;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusConsumer.FilterableBusConsumer;
import org.onap.policy.common.utils.gson.GsonTestUtils;
public class SingleThreadedBusTopicSourceTest extends TopicTestBase {
@@ -287,22 +286,6 @@ public class SingleThreadedBusTopicSourceTest extends TopicTestBase {
}
@Test
- public void testSetFilter() {
- FilterableBusConsumer filt = mock(FilterableBusConsumer.class);
- cons = filt;
-
- source.start();
- source.setFilter("my-filter");
- verify(filt).setFilter("my-filter");
- }
-
- @Test(expected = UnsupportedOperationException.class)
- public void testSetFilter_Unsupported() {
- source.start();
- source.setFilter("unsupported-filter");
- }
-
- @Test
public void testGetConsumerGroup() {
assertEquals(MY_CONS_GROUP, source.getConsumerGroup());
}