// TODO: need to get the OMFactory again because for DOOM, it is stateful
OMDocument document = metaFactory.getOMFactory().createOMDocument();
OMElement root = factory.createOMElement("root", null, document);
root.addChild(incompleteElement);
StringWriter out = new StringWriter();
document.serializeAndConsume(out);
XMLAssert.assertXMLEqual("<root><elem>text</elem></root>", out.toString());
assertConsumed(incompleteElement);
}
}