protected void runTest() throws Throwable {
OMFactory factory = metaFactory.getOMFactory();
OMElement element = factory.createOMElement("test", "urn:test", "");
// Retrieve the namespace declaration generated by createOMElement
OMNamespace ns = (OMNamespace)element.getAllDeclaredNamespaces().next();
OMAttribute att = factory.createOMAttribute("test", null, "test");
element.addAttribute(att);
Iterator it = element.getAllDeclaredNamespaces();
assertTrue(it.hasNext());
assertEquals(ns, it.next());
assertFalse(it.hasNext());