Element el = (Element)getOnlyChild(
html(fromString("<html><b>my text</b></html>")));
doc.appendChild(doc.adoptNode(el));
StringBuilder sb = new StringBuilder();
RenderContext rc = new RenderContext(new Concatenator(sb))
.withMarkupRenderMode(expectedPair.a);
Nodes.render(doc.getDoctype(), el, Namespaces.HTML_DEFAULT, rc);
rc.getOut().noMoreTokens();
String actual = sb.toString();
MoreAsserts.assertStartsWith(docType, actual);
assertTrue(actual + " expected " + expectedPair.b,
actual.contains(expectedPair.b));
}