Deployment deploymentZ = new Deployment(new DeploymentDescription("Z", ShrinkWrap.create(JavaArchive.class))
.setTarget(new TargetDescription("Z")));
Deployment deploymentX = new Deployment(new DeploymentDescription("X", ShrinkWrap.create(JavaArchive.class))
.setTarget(new TargetDescription("X")));
Mockito.when(scenario.deployment(new DeploymentTargetDescription("Z"))).thenReturn(deploymentZ);
Mockito.when(scenario.deployment(new DeploymentTargetDescription("X"))).thenReturn(deploymentX);
ContainerContext containerContext = getManager().getContext(ContainerContext.class);
DeploymentContext deploymentContext = getManager().getContext(DeploymentContext.class);
try
{