@Test
public void testNextTag() throws XMLStreamException {

	XMLEventReader reader = createXmlEventReader("<?xml version=\"1.0\"?><alice david=\"edgar\"><edgar/></alice>", ACCEPT_ALL);
	Assert.assertEquals(XMLStreamConstants.START_ELEMENT, reader.nextTag().getEventType());
	Assert.assertEquals(XMLStreamConstants.START_ELEMENT, reader.nextTag().getEventType());
	Assert.assertEquals(XMLStreamConstants.END_ELEMENT, reader.nextTag().getEventType());
	Assert.assertEquals(XMLStreamConstants.END_ELEMENT, reader.nextTag().getEventType());
	reader = createXmlEventReader("<?xml version=\"1.0\"?><alice david=\"edgar\"><edgar/></alice>", ACCEPT_ALL);
	reader.peek();
	Assert.assertEquals(XMLStreamConstants.START_ELEMENT, reader.nextTag().getEventType());
	reader.peek();
	Assert.assertEquals(XMLStreamConstants.START_ELEMENT, reader.nextTag().getEventType());
	reader.peek();
	Assert.assertEquals(XMLStreamConstants.END_ELEMENT, reader.nextTag().getEventType());
	reader.peek();
	Assert.assertEquals(XMLStreamConstants.END_ELEMENT, reader.nextTag().getEventType());
}