doc.insertChild(c1, 0);
grandparent.insertChild(c2, 0);
parent.insertChild(c3, 0);
child.insertChild(c4, 0);
Nodes result = doc.query("descendant::comment()");
assertEquals(4, result.size());
assertEquals(c1, result.get(0));
assertEquals(c2, result.get(1));
assertEquals(c3, result.get(2));
assertEquals(c4, result.get(3));