@Test public void testXhtmlReferences() {

    Document doc = Jsoup.parse("&lt; &gt; &amp; &quot; &apos; &times;");
    doc.outputSettings().escapeMode(Entities.EscapeMode.xhtml);
    assertEquals("&lt; &gt; &amp; &quot; &apos; ×", doc.body().html());
}