@Test
    public void testContentEscaping() {
        //String badString = "\"&<>'\n\r\u0000";
        String badString = "\"&<>'";
        XmlStream xml = new XmlStream();
        xml.beginTag("foo");
        xml.addContent(badString);
        xml.endTag();
        String expected = "<foo>\"&amp;&lt;&gt;'</foo>\n";
        assertEquals(expected, xml.toString());
    }
Test that content is XML escaped.
document/src/test/java/com/yahoo/document/serialization/XmlStreamTestCase.java