protected void runTest() throws Throwable {
OMFactory factory = metaFactory.getOMFactory();
OMSourcedElement element = factory.createOMElement(new ByteArrayDataSource(
"<element attr='value'><a/></element>".getBytes("utf-8"), "utf-8"));
element.removeChildren();
// Check that the attribute has been added
Iterator it = element.getAllAttributes();
assertTrue(it.hasNext());
OMAttribute attr = (OMAttribute)it.next();
assertEquals("attr", attr.getLocalName());