@Test public void testElementSiblingIndex() {

    Document doc = Jsoup.parse("<div><p>One</p>...<p>Two</p>...<p>Three</p>");
    Elements ps = doc.select("p");
    assertTrue(0 == ps.get(0).elementSiblingIndex());
    assertTrue(1 == ps.get(1).elementSiblingIndex());
    assertTrue(2 == ps.get(2).elementSiblingIndex());
}