// 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();
AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
PersistenceContextAnnotationHelper.processAnnotations(annotatedWebApp, classFinder);
URL expectedXML = classLoader.getResource("annotation/persistence-context-expected.xml");
XmlObject expected = XmlObject.Factory.parse(expectedXML);
log.debug("[@PersistenceContext Source XML] " + '\n' + webApp.toString() + '\n');
log.debug("[@PersistenceContext Expected XML]" + '\n' + expected.toString() + '\n');
List problems = new ArrayList();
boolean ok = compareXmlObjects(webApp, expected, problems);
assertTrue("Differences: " + problems, ok);
}