HTMLUtils { public static String toString(Document document) { return HTMLUtils.toString(document, false, false); } private  HTMLUtils(); static String toString(Document document); static String toString(Document document, boolean omitDeclaration, boolean omitDoctype); static void stripHTMLEnvelope(Document document); static void stripFirstElementInside(Document document, String parentTagName, String elementTagName); @Unstable static String escapeElementText(String content);  }
@Test void testCornerCases() { Document document = this.cleaner.clean(new StringReader("<html><head /><body foo=\"\"></body></html>")); assertEquals(DefaultHTMLCleanerTest.HEADER + "<html><head></head><body foo=\"\"></body></html>\n", HTMLUtils.toString(document)); }