}
protected void runTest() throws Throwable {
// Create a document with 2 children, each named "sample" but
// have different namespaces.
OMFactory factory = metaFactory.getOMFactory();
OMNamespace a = factory.createOMNamespace(NS_A, "a");
OMNamespace b = factory.createOMNamespace(NS_B, "b");
OMElement documentElement = factory.createOMElement("Document", a);
factory.createOMElement("sample", a, documentElement);
factory.createOMElement("sample", b, documentElement);
// Test for fully qualified names
QName qName = new QName(NS_A, "sample");
assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1);
qName = new QName(NS_B, "sample");
assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1);
qName = new QName(NS_C, "sample");
assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 0);
// Test for QName with no namespace.
// The original Axiom implementation interpretted this as a wildcard.
// In order to not break existing code, this should return 2
qName = new QName("", "sample");
assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 2);
// Now add an unqualified sample element to the documentElement
factory.createOMElement("sample", null, documentElement);
// Repeat the tests
qName = new QName(NS_A, "sample");
assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1);