public void testTransformXMLStreamReader() throws Exception
{
Object expectedResult = getResultData();
assertNotNull(expectedResult);
XmlToDomDocument transformer = (XmlToDomDocument) getTransformer();
InputStream is = IOUtils.getResourceAsStream("cdcatalog.xml", XMLTestUtils.class);
XMLStreamReader sr = XMLUtils.toXMLStreamReader(transformer.getXMLInputFactory(), is);
Object result = transformer.transform(sr);
writeXml((Node) result, System.out);
assertNotNull(result);
assertTrue("expected: " + expectedResult + "\nresult: " + result, compareResults(expectedResult, result));
}