summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src/test')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java8
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java8
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java5
3 files changed, 10 insertions, 11 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
index 605a7330c..6f667bb76 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcomeTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. 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.
@@ -112,10 +112,10 @@ public class OperationOutcomeTest {
outcome.setOperation(OPERATION);
// null actor argument
- assertThatThrownBy(() -> outcome.isFor(null, OPERATION));
+ assertThatThrownBy(() -> outcome.isFor(null, OPERATION)).isInstanceOf(NullPointerException.class);
// null operation argument
- assertThatThrownBy(() -> outcome.isFor(ACTOR, null));
+ assertThatThrownBy(() -> outcome.isFor(ACTOR, null)).isInstanceOf(NullPointerException.class);
// true case
assertTrue(OperationOutcome.isFor(outcome, ACTOR, OPERATION));
@@ -126,7 +126,7 @@ public class OperationOutcomeTest {
outcome.setResult(OperationResult.FAILURE_EXCEPTION);
assertEquals(OperationResult.FAILURE_EXCEPTION, outcome.getResult());
- assertThatThrownBy(() -> outcome.setResult(null));
+ assertThatThrownBy(() -> outcome.setResult(null)).isInstanceOf(NullPointerException.class);
}
private void setAll() {
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
index 08d4adfd2..95799b7d2 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. 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.
@@ -166,7 +166,7 @@ public class BidirectionalTopicOperationTest {
assertEquals(OperationResult.SUCCESS, outcome.getResult());
assertEquals(response, outcome.getResponse());
- verify(forwarder).unregister(eq(Arrays.asList(REQ_ID)), eq(listenerCaptor.getValue()));
+ verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
}
/**
@@ -194,7 +194,7 @@ public class BidirectionalTopicOperationTest {
assertTrue(executor.runAll(MAX_REQUESTS));
assertTrue(future.isCompletedExceptionally());
- verify(forwarder).unregister(eq(Arrays.asList(REQ_ID)), eq(listenerCaptor.getValue()));
+ verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
}
/**
@@ -210,7 +210,7 @@ public class BidirectionalTopicOperationTest {
verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
// must still unregister
- verify(forwarder).unregister(eq(Arrays.asList(REQ_ID)), eq(listenerCaptor.getValue()));
+ verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
}
@Test
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java
index 54d56de53..7f2f6770e 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. 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.
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -68,7 +67,7 @@ public class BidirectionalTopicHandlerTest {
MockitoAnnotations.initMocks(this);
when(mgr.getTopicSinks(MY_SINK)).thenReturn(Arrays.asList(publisher));
- when(mgr.getTopicSources(eq(Arrays.asList(MY_SOURCE)))).thenReturn(Arrays.asList(subscriber));
+ when(mgr.getTopicSources(Arrays.asList(MY_SOURCE))).thenReturn(Arrays.asList(subscriber));
when(publisher.getTopicCommInfrastructure()).thenReturn(CommInfrastructure.NOOP);