@Test
public void shouldDefaultToDefaultWithMultipleDeployments()
{
DeploymentScenario scenario = new DeploymentScenario();
scenario.addDeployment(
new DeploymentDescription("A", ShrinkWrap.create(JavaArchive.class))
.setTarget(TargetDescription.DEFAULT));
scenario.addDeployment(
new DeploymentDescription(DEFAULT_NAME, Descriptors.create(BeansDescriptor.class))
.setTarget(TargetDescription.DEFAULT));
scenario.addDeployment(
new DeploymentDescription(DEFAULT_NAME, ShrinkWrap.create(JavaArchive.class))
.setTarget(TargetDescription.DEFAULT));
Deployment defaultDeployment = scenario.deployment(DeploymentTargetDescription.DEFAULT);
Assert.assertNotNull(defaultDeployment);
Assert.assertEquals(DEFAULT_NAME, defaultDeployment.getDescription().getName());