if(artifact.getURI().toString().equals("META-INF/ejb-jar.composite")) {
Composite composite = (Composite)artifact.getModel();
Assert.assertEquals("Number of components", 1, composite.getComponents().size());
Component component = composite.getComponents().get(0);
Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
Service service = ejbImpl.getServices().get(0);
Assert.assertEquals("Service name", "HelloworldService", service.getName());
}
}
List<Composite> deployables = contribution.getDeployables();
Assert.assertEquals("Deployable composites", 1, deployables.size());
Composite composite = deployables.get(0);
Assert.assertEquals("Number of components", 1, composite.getComponents().size());
Component component = composite.getComponents().get(0);
Assert.assertTrue("Component with implementation.ejb", component.getImplementation() instanceof EJBImplementation);
EJBImplementation ejbImpl = (EJBImplementation) component.getImplementation();
Assert.assertEquals("Number of services", 1, ejbImpl.getServices().size());
Service service = ejbImpl.getServices().get(0);
Assert.assertEquals("Service name", "HelloworldService", service.getName());
}