public TestGetXMLStreamReaderWithNamespaceURIInterning(OMMetaFactory metaFactory) {
super(metaFactory);
}
protected void runTest() throws Throwable {
OMFactory factory = metaFactory.getOMFactory();
// Use "new String" to create String objects that are not interned
OMNamespace ns1 = factory.createOMNamespace(new String("urn:ns1"), "p");
OMNamespace ns2 = factory.createOMNamespace(new String("urn:ns2"), "q");
OMElement root = factory.createOMElement("root", ns1);
root.addAttribute("attr", "value", ns2);
factory.createOMElement("child", ns2, root);
OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration();
configuration.setNamespaceURIInterning(true);
XMLStreamReader reader = root.getXMLStreamReader(true, configuration);
reader.nextTag();