//
// 2. env-entry
//
URL srcXML = classLoader.getResource("annotation/empty-web-src.xml");
XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
WebAppDocument webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
WebAppType webApp = webAppDoc.getWebApp();
AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
ResourceAnnotationHelper.processAnnotations(annotatedWebApp, classFinder, EnvironmentEntryBuilder.EnvEntryRefProcessor.INSTANCE);
URL expectedXML = classLoader.getResource("annotation/env-entry-expected.xml");
XmlObject expected = XmlObject.Factory.parse(expectedXML);
log.debug("[@Resource <env-entry> Source XML] " + '\n' + webApp.toString() + '\n');
log.debug("[@Resource <env-entry> Expected XML]" + '\n' + expected.toString() + '\n');
List problems = new ArrayList();
boolean ok = compareXmlObjects(webApp, expected, problems);
assertTrue("Differences: " + problems, ok);
//
// 3. service-ref
//
srcXML = classLoader.getResource("annotation/empty-web-src.xml");
xmlObject = XmlObject.Factory.parse(srcXML, options);
webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
webApp = webAppDoc.getWebApp();
annotatedWebApp = new AnnotatedWebApp(webApp);
ResourceAnnotationHelper.processAnnotations(annotatedWebApp, classFinder, SwitchingServiceRefBuilder.ServiceRefProcessor.INSTANCE);
expectedXML = classLoader.getResource("annotation/service-ref-expected.xml");
expected = XmlObject.Factory.parse(expectedXML);
log.debug("[@Resource <service-ref> Source XML] " + '\n' + webApp.toString() + '\n');