diff options
Diffstat (limited to 'participant/participant-intermediary/src/test/java')
-rw-r--r-- | participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java index 661c009f6..b8fd3b42d 100644 --- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java +++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java @@ -47,6 +47,7 @@ import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCom import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionDeployAck; import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionMigration; import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionStateChange; +import org.onap.policy.clamp.models.acm.messages.kafka.participant.ParticipantPrimeAck; import org.onap.policy.clamp.models.acm.messages.kafka.participant.PropertiesUpdate; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.LockOrder; @@ -273,7 +274,7 @@ class AutomationCompositionHandlerTest { } @Test - void handleComposiotDeprimeTest() { + void handleCompositionDeprimeTest() { var acElementDefinition = new AutomationCompositionElementDefinition(); acElementDefinition.setAcElementDefinitionId(new ToscaConceptIdentifier("key", "1.0.0")); var toscaNodeTemplate = new ToscaNodeTemplate(); @@ -292,6 +293,17 @@ class AutomationCompositionHandlerTest { } @Test + void handleCompositionAlreadyDeprimedTest() { + var messageId = UUID.randomUUID(); + var compositionId = UUID.randomUUID(); + var participantMessagePublisher = mock(ParticipantMessagePublisher.class); + var ach = new AutomationCompositionHandler(mock(CacheProvider.class), participantMessagePublisher, + mock(ThreadHandler.class)); + ach.deprime(messageId, compositionId); + verify(participantMessagePublisher).sendParticipantPrimeAck(any(ParticipantPrimeAck.class)); + } + + @Test void restartedTest() { var acElementDefinition = new AutomationCompositionElementDefinition(); acElementDefinition.setAcElementDefinitionId(new ToscaConceptIdentifier("key", "1.0.0")); |