+ @Test
+ void testAcDeployListWithRemovedElements() {
+ var removedElement1 = CommonTestData.getJsonObject(
+ "src/test/resources/json/AutomationCompositionElementNoOrderedState.json",
+ AutomationCompositionElement.class);
+ var participantId1 = UUID.randomUUID();
+ var participantId2 = UUID.randomUUID();
+ assert removedElement1 != null;
+ removedElement1.setParticipantId(participantId1);
+ var removedElement2 = new AutomationCompositionElement(removedElement1);
+ removedElement2.setParticipantId(participantId2);
+
+ var automationComposition = getDummyAutomationComposition();
+ var result = AcmUtils.createParticipantDeployList(automationComposition, DeployOrder.DEPLOY,
+ List.of(removedElement1, removedElement2));
+ assertThat(result).hasSize(automationComposition.getElements().values().size() + 2);
+ var participantIds = result.stream().map(ParticipantDeploy::getParticipantId).toList();
+ assertThat(participantIds).containsAll(List.of(participantId1, participantId2));
+ }
+