summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appclcm/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.appclcm/src/test')
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
index b2a44af53..c5ec58acd 100644
--- a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -127,6 +128,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation {
outcome = oper.start().get();
assertEquals(PolicyResult.SUCCESS, outcome.getResult());
+ assertTrue(outcome.getResponse() instanceof AppcLcmDmaapWrapper);
}
@Test
@@ -163,7 +165,8 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation {
assertTrue(executor.runAll(100));
assertTrue(future2.isDone());
- assertEquals(PolicyResult.SUCCESS, future2.get().getResult());
+ outcome = future2.get();
+ assertEquals(PolicyResult.SUCCESS, outcome.getResult());
}
@Test
@@ -258,21 +261,25 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation {
oper.setOutcome(outcome, PolicyResult.SUCCESS, response);
assertEquals(PolicyResult.SUCCESS, outcome.getResult());
assertEquals(MY_MESSAGE, outcome.getMessage());
+ assertSame(response, outcome.getResponse());
// failure
oper.setOutcome(outcome, PolicyResult.FAILURE, response);
assertEquals(PolicyResult.FAILURE, outcome.getResult());
assertEquals(MY_MESSAGE, outcome.getMessage());
+ assertSame(response, outcome.getResponse());
// null message
response.getBody().getOutput().getStatus().setMessage(null);
oper.setOutcome(outcome, PolicyResult.SUCCESS, response);
assertEquals(ControlLoopOperation.SUCCESS_MSG, outcome.getMessage());
+ assertSame(response, outcome.getResponse());
// null status
response.getBody().getOutput().setStatus(null);
oper.setOutcome(outcome, PolicyResult.SUCCESS, response);
assertEquals(ControlLoopOperation.SUCCESS_MSG, outcome.getMessage());
+ assertSame(response, outcome.getResponse());
}
@Test