@Test
public void testWriteComment() throws XMLStreamException {

	XMLStreamWriter writer = createXMLStreamWriter(false);
	writer.writeStartElement("foo");
	writer.writeComment("bar");
	writer.writeEndElement();
	writer.flush();
	Assert.assertEquals("<foo><!--bar--></foo>", writer.toString());
}