@Test public void before() {

    Document doc = Jsoup.parse("<div><p>Hello</p><p>There</p></div>");
    Element p1 = doc.select("p").first();
    p1.before("<div>one</div><div>two</div>");
    assertEquals("<div><div>one</div><div>two</div><p>Hello</p><p>There</p></div>", TextUtil.stripNewlines(doc.body().html()));
    
    doc.select("p").last().before("<p>Three</p><!-- four -->");
    assertEquals("<div><div>one</div><div>two</div><p>Hello</p><p>Three</p><!-- four --><p>There</p></div>", TextUtil.stripNewlines(doc.body().html()));
}