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