public static StanzaError parseError(XmlPullParser parser) throws XmlPullParserException, IOException, SmackParsingException {
        return parseError(parser, null);
    }
@Test
    public void ensureNoNullLangInParsedDescriptiveTexts() throws Exception {
        final String text = "Dummy descriptive text";
        final String errorXml = XMLBuilder
            .create(StanzaError.ERROR).a("type", "cancel").up()
            .element("internal-server-error", StanzaError.ERROR_CONDITION_AND_TEXT_NAMESPACE).up()
            .element("text", StanzaError.ERROR_CONDITION_AND_TEXT_NAMESPACE).t(text).up()
            .asString();
        XmlPullParser parser = TestUtils.getParser(errorXml);
        StanzaError error = PacketParserUtils.parseError(parser);
        assertEquals(text, error.getDescriptiveText());
    }