### Question:
VanillaCajaHtmlSerializer implements HtmlSerializer { public String serialize(Document doc) { try { StringWriter sw = HtmlSerialization.createWriter(doc); if (doc.getDoctype() != null) { HtmlSerialization.outputDocType(doc.getDoctype(), sw); } RenderContext renderContext = new RenderContext(new Concatenator(sw, null)) .withAsciiOnly(false) .withMarkupRenderMode(MarkupRenderMode.HTML); Nodes.renderUnsafe(doc, renderContext); return sw.toString(); } catch (IOException e) { return null; } }  String serialize(Document doc);  }### Answer:
@Test public void testParseAndSerializeNonASCIINotEscaped() throws Exception { String html = "<html><head><script src=\"1.js\"></script></head>" + "<body><a href=\"hello\">\\u200E\\u200F\\u2010\\u0410</a>" + "</body></html>"; assertEquals(html, serializer.serialize(parser.parseDom(html))); }
@Test public void testParseAndSerializeCommentsNotRemoved() throws Exception { String html = "<html><head><script src=\"1.js\"></script></head>" + "<body><div>before <!-- Test Data --> after \n" + "<!-- [if IE ]>" + "<link href=\"iecss.css\" rel=\"stylesheet\" type=\"text/css\">" + "<![endif]-->" + "</div></body></html>"; assertEquals(html, serializer.serialize(parser.parseDom(html))); }