@Test
public void escapeXml() throws Exception {

    // "bread" & "butter'ed" => &quot;bread&quot; &amp; &quot;butter&apos;ed&quot;
    String str0 = StringUtil.escapeXml("\"bread\" & \"butter'ed\"");
    Assert.assertEquals("&quot;bread&quot; &amp; &quot;butter&apos;ed&quot;", str0);
    str0 = StringUtil.escapeXml("\n\r");
    Assert.assertEquals("&#10;&#13;", str0);
    str0 = StringUtil.escapeXml(null);
    Assert.assertNull(str0);
    str0 = StringUtil.escapeXml("");
    Assert.assertEquals("", str0);
    str0 = StringUtil.escapeXml("Hello World");
    Assert.assertEquals("Hello World", str0);
}