protected void runTest() throws Throwable {
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
StAXDialect dialect = StAXDialectDetector.getDialect(inputFactory.getClass());
inputFactory = dialect.normalize(inputFactory);
// Make sure CDATA sections are reported by the StAX parser
inputFactory = dialect.enableCDataReporting(inputFactory);
XMLStreamReader reader = inputFactory.createXMLStreamReader(getTestResource(file));
StAXOMBuilder builder = new StAXOMBuilder(omMetaFactory.getOMFactory(), reader);
OMSource source = new OMSource(builder.getDocumentElement());
ByteArrayOutputStream out = new ByteArrayOutputStream();
StreamResult result = new StreamResult(out);