Support for optional rApp and rApp instance parameters
[nonrtric/plt/rappmanager.git] / rapp-manager-models / src / test / java / com / oransc / rappmanager / models / statemachine / RappInstanceStateMachineConfigTest.java
index 1ab5481..1c7b97e 100755 (executable)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START======================================================================
  * Copyright (C) 2023 Nordix Foundation. All rights reserved.
+ * Copyright (C) 2024 OpenInfra Foundation Europe. 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.
@@ -39,7 +40,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
 @ExtendWith(SpringExtension.class)
 @SpringBootTest(classes = {RappInstanceStateMachineConfig.class})
 @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
-public class RappInstanceStateMachineConfigTest {
+class RappInstanceStateMachineConfigTest {
 
     @Autowired
     StateMachineFactory<RappInstanceState, RappEvent> stateMachineFactory;
@@ -49,6 +50,8 @@ public class RappInstanceStateMachineConfigTest {
     @BeforeEach
     void getStateMachine() {
         stateMachine = stateMachineFactory.getStateMachine(UUID.randomUUID());
+        stateMachine.getExtendedState().getVariables().put("sme", true);
+        stateMachine.getExtendedState().getVariables().put("dme", true);
         stateMachine.startReactively().subscribe();
     }
 
@@ -59,7 +62,7 @@ public class RappInstanceStateMachineConfigTest {
 
     @Test
     void testOnboardedState() throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().build();
         plan.test();
@@ -67,7 +70,7 @@ public class RappInstanceStateMachineConfigTest {
 
     @Test
     void testDeployingState() throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().build();
@@ -75,9 +78,9 @@ public class RappInstanceStateMachineConfigTest {
     }
 
     @ParameterizedTest
-    @EnumSource(value = RappEvent.class, names = {"ACMDEPLOYED", "SMEDEPLOYED"})
+    @EnumSource(value = RappEvent.class, names = {"ACMDEPLOYED", "SMEDEPLOYED", "DMEDEPLOYED"})
     void testIndividualDeployedState(RappEvent rappEvent) throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
@@ -87,7 +90,47 @@ public class RappInstanceStateMachineConfigTest {
 
     @Test
     void testDeployedState() throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().build();
+        plan.test();
+    }
+
+    @Test
+    void testDeployedStateAcmOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("sme", false);
+        stateMachine.getExtendedState().getVariables().put("dme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().build();
+        plan.test();
+    }
+
+    @Test
+    void testDeployedStateAcmOnlyWithNoKeyReference() throws Exception {
+        stateMachine.getExtendedState().getVariables().remove("sme");
+        stateMachine.getExtendedState().getVariables().remove("dme");
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().build();
+        plan.test();
+    }
+
+    @Test
+    void testDeployedStateAcmAndSmeOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("dme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
@@ -98,39 +141,81 @@ public class RappInstanceStateMachineConfigTest {
     }
 
     @Test
-    void testDeployFailedState() throws Exception {
-        StateMachineTestPlan plan =
+    void testDeployedStateAcmAndDmeOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("sme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().build();
+        plan.test();
+    }
+
+    @Test
+    void testAcmDeployFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYFAILED).expectState(RappInstanceState.UNDEPLOYED)
+                        .expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+    @Test
+    void testSmeDeployFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
                         .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
                         .sendEvent(RappEvent.SMEDEPLOYFAILED).expectState(RappInstanceState.UNDEPLOYED)
                         .expectStateChanged(1).and().build();
         plan.test();
     }
 
+    @Test
+    void testDmeDeployFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYFAILED).expectState(RappInstanceState.UNDEPLOYED)
+                        .expectStateChanged(1).and().build();
+        plan.test();
+    }
+
     @Test
     void testUndeployingState() throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
                         .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
-                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
                         .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
                         .expectStateChanged(1).and().build();
         plan.test();
     }
 
     @ParameterizedTest
-    @EnumSource(value = RappEvent.class, names = {"ACMUNDEPLOYED", "SMEUNDEPLOYED"})
+    @EnumSource(value = RappEvent.class, names = {"ACMUNDEPLOYED", "SMEUNDEPLOYED", "DMEUNDEPLOYED"})
     void testIndividualUndeployedState(RappEvent rappEvent) throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
                         .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
-                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
                         .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
                         .expectStateChanged(1).and().step().sendEvent(rappEvent)
                         .expectState(RappInstanceState.UNDEPLOYING).and().build();
@@ -139,22 +224,56 @@ public class RappInstanceStateMachineConfigTest {
 
     @Test
     void testUndeployedState() throws Exception {
-        StateMachineTestPlan plan =
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
                         .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
-                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
                         .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
                         .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
                         .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.SMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.DMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+
+    @Test
+    void testUndeployedStateAcmOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("sme", false);
+        stateMachine.getExtendedState().getVariables().put("dme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+    @Test
+    void testUndeployedStateAcmOnlyWithNoKeyReference() throws Exception {
+        stateMachine.getExtendedState().getVariables().remove("sme");
+        stateMachine.getExtendedState().getVariables().remove("dme");
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
                         .expectState(RappInstanceState.UNDEPLOYED).expectStateChanged(1).and().build();
         plan.test();
     }
 
     @Test
-    void testUndeployFailedState() throws Exception {
-        StateMachineTestPlan plan =
+    void testUndeployedStateAcmAndSmeOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("dme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
                 StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
                         .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
                         .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
@@ -162,8 +281,75 @@ public class RappInstanceStateMachineConfigTest {
                         .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
                         .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
                         .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.SMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+    @Test
+    void testUndeployedStateAcmAndDmeOnly() throws Exception {
+        stateMachine.getExtendedState().getVariables().put("sme", false);
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.DMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+    @Test
+    void testUndeployAcmFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.SMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.DMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.ACMUNDEPLOYFAILED)
+                        .expectState(RappInstanceState.DEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
+
+    @Test
+    void testUndeploySmeFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.DMEUNDEPLOYED)
                         .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.SMEUNDEPLOYFAILED)
                         .expectState(RappInstanceState.DEPLOYED).expectStateChanged(1).and().build();
         plan.test();
     }
+
+    @Test
+    void testUndeployDmeFailedState() throws Exception {
+        StateMachineTestPlan<RappInstanceState, RappEvent> plan =
+                StateMachineTestPlanBuilder.<RappInstanceState, RappEvent>builder().stateMachine(stateMachine).step()
+                        .expectState(RappInstanceState.UNDEPLOYED).and().step().sendEvent(RappEvent.DEPLOYING)
+                        .expectState(RappInstanceState.DEPLOYING).expectStateChanged(1).and().step()
+                        .sendEvent(RappEvent.ACMDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.SMEDEPLOYED).expectState(RappInstanceState.DEPLOYING).and().step()
+                        .sendEvent(RappEvent.DMEDEPLOYED).expectState(RappInstanceState.DEPLOYED).expectStateChanged(1)
+                        .and().step().sendEvent(RappEvent.UNDEPLOYING).expectState(RappInstanceState.UNDEPLOYING)
+                        .expectStateChanged(1).and().step().sendEvent(RappEvent.ACMUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.SMEUNDEPLOYED)
+                        .expectState(RappInstanceState.UNDEPLOYING).and().step().sendEvent(RappEvent.DMEUNDEPLOYFAILED)
+                        .expectState(RappInstanceState.DEPLOYED).expectStateChanged(1).and().build();
+        plan.test();
+    }
 }