final Node child = new Node();
child.setId("ID");
child.setSid("SID");
elements.add(child);
elements.clear();
// Check if node was correctly detached from elements
assertEquals(0, elements.size());
assertNull(child.getParent());
assertNull(child.getDocument());