public SimplePayload(String xmlPayload) {
        XmlPullParser parser;
        try {
            parser = PacketParserUtils.getParserFor(xmlPayload);
        }
        catch (XmlPullParserException | IOException e) {
            throw new AssertionError(e);
        }
        QName qname = parser.getQName();

        payload = xmlPayload;

        elemName = StringUtils.requireNotNullNorEmpty(qname.getLocalPart(), "Could not determine element name from XML payload");
        ns = StringUtils.requireNotNullNorEmpty(qname.getNamespaceURI(), "Could not determine namespace from XML payload");
    }
@Test
    public void simplePayloadTest() {
        String xmlPayload = "<element xmlns='https://example.org'><foo>Test</foo><bar/></element>";
        SimplePayload simplePayload = new SimplePayload(xmlPayload);

        assertEquals("element", simplePayload.getElementName());
        assertEquals("https://example.org", simplePayload.getNamespace());
        assertEquals(xmlPayload, simplePayload.toXML().toString());
    }