}
@Test
public void testGetQNameForStaxSourceStreamReader() throws Exception {
String contents = "<prefix:localname xmlns:prefix='namespace'/>";
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
XMLStreamReader streamReader = inputFactory.createXMLStreamReader(new StringReader(contents));
Source source = StaxUtils.createStaxSource(streamReader);
QName qName = PayloadRootUtils.getPayloadRootQName(source, TransformerFactory.newInstance());
Assert.assertNotNull("getQNameForNode returns null", qName);
Assert.assertEquals("QName has invalid localname", "localname", qName.getLocalPart());
Assert.assertEquals("Qname has invalid namespace", "namespace", qName.getNamespaceURI());