@Deployment
  public static Archive<?> deploy() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class);
    JavaArchive earLib = ShrinkWrap.create(JavaArchive.class);
    earLib.addClasses(EarResourceListingTestCase.class, ResourceListingUtils.class);
    earLib.addAsManifestResource(EmptyAsset.INSTANCE, "emptyJarLibResource.properties");
    earLib.addAsManifestResource(EmptyAsset.INSTANCE, "properties/nestedJarLib.properties");
    ear.addAsLibraries(earLib);

    WebArchive war = ShrinkWrap.create(WebArchive.class, INNER_WAR_ARCHIVE_NAME);
    war.addClass(TestA.class);
    war.add(EmptyAsset.INSTANCE, "META-INF/example.txt");
    war.add(EmptyAsset.INSTANCE, "META-INF/properties/nested.properties");
    war.add(EmptyAsset.INSTANCE, "example2.txt");
    war.addAsResource(
        EarResourceListingTestCase.class.getPackage(), "TextFile1.txt", "TextFile1.txt");
    war.addAsWebInfResource(EarResourceListingTestCase.class.getPackage(), "web.xml", "web.xml");

    JavaArchive libJar = ShrinkWrap.create(JavaArchive.class, INNER_JAR_ARCHIVE_NAME);
    libJar.addClass(WebInfLibClass.class);

    war.addAsLibraries(libJar);
    ear.addAsModules(libJar, war);
    ear.addAsManifestResource(EmptyAsset.INSTANCE, "MANIFEST.MF");
    ear.addAsResource(EmptyAsset.INSTANCE, "emptyEarResource");
    ear.addAsManifestResource(
        EarResourceListingTestCase.class.getPackage(), "application.xml", "application.xml");

    return ear;
  }
 @Deployment(name = MANAGED_BEAN_EAR, testable = false)
 public static Archive<?> getManagedBeanEar() {
   WebArchive war = ShrinkWrap.create(WebArchive.class, MANAGED_BEAN_WAR);
   war.addClasses(SimpleBeanServlet.class);
   JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MANAGED_BEAN_JAR);
   jar.addClasses(SimpleManagedBean.class);
   jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
   EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, MANAGED_BEAN_EAR);
   ear.addAsModules(jar, war);
   return ear;
 }