assertEquals("There should be no child elements for parent2", 0,
elements.length);
// Make parent1 and parent2 child of some root element to ensure that
// they do appear in the root's children.
Element root = factory.element("root");
root.addContent(parent1);
root.addContent(parent2);
elements = provider.getChildren(root);
assertEquals("There should be two child elements for root.", 2,