aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java')
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
index e0accc4a0..4ff759c13 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
@@ -60,6 +60,8 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
class SupervisionMessagesTest {
+ private static final String AC_INSTANTIATION_UPDATE_JSON =
+ "src/test/resources/rest/acm/AutomationCompositionUpdate.json";
private static final String NOT_ACTIVE = "Not Active!";
private static final CommInfrastructure INFRA = CommInfrastructure.NOOP;
private static final String TOPIC = "my-topic";
@@ -207,6 +209,17 @@ class SupervisionMessagesTest {
}
@Test
+ void testAcElementPropertiesPublisher() {
+ var publisher = new AcElementPropertiesPublisher();
+ var topicSink = mock(TopicSink.class);
+ publisher.active(List.of(topicSink));
+ var automationComposition =
+ InstantiationUtils.getAutomationCompositionFromResource(AC_INSTANTIATION_UPDATE_JSON, "Crud");
+ publisher.send(automationComposition);
+ verify(topicSink).send(anyString());
+ }
+
+ @Test
void testParticipantRegisterListener() {
final var participantRegister = new ParticipantRegister();
var supervisionHandler = mock(SupervisionParticipantHandler.class);