assertEquals("Iterator must return 6 children, having not detached the children", childCount, 6);
}
private OMElement getSampleDocumentElement(OMNamespace testNamespace){
OMFactory factory = OMAbstractFactory.getOMFactory();
OMElement documentElement = factory.createOMElement("Employees", testNamespace);
documentElement.declareNamespace(testNamespace);
OMElement employee;
OMElement name;
for (int i = 0; i < 5; i++) {
employee = factory.createOMElement("Employee", testNamespace, documentElement);
name = factory.createOMElement("Name"+i, testNamespace);
employee.addAttribute("myAttr", "Axis2", testNamespace);
name.setText("Apache Developer");
employee.addChild(name);
}
//adding one more child with the given attr
employee = factory.createOMElement("Employee", testNamespace, documentElement);
name = factory.createOMElement("Name", testNamespace);
name.addAttribute("myAttr", "Un-Related Value", testNamespace);
name.setText("Apache Developer");
employee.addChild(name);
return documentElement;