assertEquals("1234567890 &ent; & & // " ", root.getChildNodes().get(2).getContents());
}
public void test__3() {
Document document = new Document("root");
Node root = document.getRootNode();
root.addChildNode("node").setContents("something with a \n newline");
String xml = new XMLWriter(document).generateXML();
String expected = "" +
"<?xml version='1.0' encoding='utf-8'?>\n" +
"<root>\n" +
"\n" +
" <node>something with a \n" +
" newline</node>\n" +
"\n" +
"</root>";
assertEquals(expected.trim(), xml.trim());
XMLReader reader = new XMLReader();
document = reader.parse(xml);
Node node = document.getRootNode().getNode("node");
expected = "" +
"something with a \n" +
" newline";
assertEquals(expected, node.getContents());