WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
.version("3.0");
decorateDescriptor(descriptor);
WebArchive archive = ShrinkWrap.create(WebArchive.class, getTestContextName() + ".war")
.setWebXML(new StringAsset(descriptor.exportAsString()))
.addAsLibraries(JarLocation.jarLocation(Test.class))
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
if (archiveClasses != null) {
for (Class c: archiveClasses) {