WebArchive war1 = createWar("simple1.war", true, ServletWebBean.class);
ear.addModule(war1);
WebArchive war2 = createWar("simple2.war", true, NotWBJsfBean.class);
ear.addModule(war2);
MockArchiveManifest.addManifest(ear);
DeploymentUnit unit = assertDeploy(ear);
Iterator<DeploymentUnit> iterator = unit.getChildren().iterator();
DeploymentUnit unit1 = iterator.next();
DeploymentUnit unit2 = iterator.next();
if (unit2.getName().contains("simple1.war"))
{
DeploymentUnit temp = unit2;
unit2 = unit1;
unit1 = temp;
}
Class<?> servletWebBeanClass = getClass(ServletWebBean.class, unit1);
Class<?> notWBJsfBeanClass = getClass(NotWBJsfBean.class, unit2);