Element root = htmlDoc.getDefaultRootElement();
Element body = root.getElement(0);
Element p = body.getElement(0);
addElement();
htmlDoc.setParser(new ParserDelegator());
assertEquals(1, body.getElementCount());
htmlDoc.insertAfterStart(p, "<a>link</a><b>bold</b>");
assertEquals("linkbold0000", htmlDoc.getText(0, htmlDoc.getLength()));
checkStructure(htmlDoc, new String[]{"html", "body", "p", "content", "content", "b", "content"});
assertEquals(1, body.getElementCount());