//-------------------------------------------------
// Ensure annotations are processed correctly
//-------------------------------------------------
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();
SecurityAnnotationHelper.processAnnotations(webApp, classFinder);
URL expectedXML = classLoader.getResource("annotation/security-expected.xml");
XmlObject expected = XmlObject.Factory.parse(expectedXML);
log.debug("[Security Source XML] " + '\n' + webApp.toString() + '\n');
log.debug("[Security Expected XML]" + '\n' + expected.toString() + '\n');
List problems = new ArrayList();
boolean ok = compareXmlObjects(webApp, expected, problems);
assertTrue("Differences: " + problems, ok);
srcXML = classLoader.getResource("annotation/security-src.xml");
xmlObject = XmlObject.Factory.parse(srcXML, options);
webAppDoc = (WebAppDocument) xmlObject.changeType(WebAppDocument.type);
webApp = webAppDoc.getWebApp();
SecurityAnnotationHelper.processAnnotations(webApp, classFinder);
expectedXML = classLoader.getResource("annotation/security-expected-1.xml");
expected = XmlObject.Factory.parse(expectedXML);
log.debug("[Security Source XML] " + '\n' + webApp.toString() + '\n');
log.debug("[Security Expected XML]" + '\n' + expected.toString() + '\n');