xmlStreamReader.next();
}
while (xmlStreamReader.hasNext());
xmlSecEventDeque.push((XMLSecEventFactory.allocate(xmlStreamReader, null)));//EndDocumentEvent
XMLSecurityEventReader xmlSecurityEventReader = new XMLSecurityEventReader(xmlSecEventDeque, 0);
XMLEventReader xmlEventReader =
xmlInputFactory.createXMLEventReader(this.getClass().getClassLoader().getResourceAsStream(
"org/apache/xml/security/c14n/inExcl/plain-soap-1.1.xml"));
while (xmlEventReader.hasNext()) {
Assert.assertEquals(xmlEventReader.hasNext(), xmlSecurityEventReader.hasNext());
XMLEvent stdXmlEvent = xmlEventReader.nextEvent();
XMLEvent secXmlEvent = xmlSecurityEventReader.nextEvent();
Assert.assertEquals(stdXmlEvent.getEventType(), secXmlEvent.getEventType());
XMLEvent stdPeekedXMLEvent = xmlEventReader.peek();
XMLEvent secPeekedXMLEvent = xmlSecurityEventReader.peek();
if (stdPeekedXMLEvent == null) {
Assert.assertNull(secPeekedXMLEvent);
} else {
Assert.assertEquals(stdPeekedXMLEvent.getEventType(), secPeekedXMLEvent.getEventType());
}
}
Assert.assertFalse(xmlEventReader.hasNext());
Assert.assertFalse(xmlSecurityEventReader.hasNext());
}