### Question:
PacketParserUtils { public static StanzaError parseError(XmlPullParser parser) throws XmlPullParserException, IOException, SmackParsingException { return parseError(parser, null); }  static XmlPullParser getParserFor(String stanza); static XmlPullParser getParserFor(InputStream inputStream); static XmlPullParser getParserFor(Reader reader); @SuppressWarnings("unchecked") static S parseStanza(String stanza); static Stanza parseStanza(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static Message parseMessage(XmlPullParser parser); static Message parseMessage(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static String parseElementText(XmlPullParser parser); static CharSequence parseElement(XmlPullParser parser); static CharSequence parseElement(XmlPullParser parser,
                    boolean fullNamespaces); static CharSequence parseContentDepth(XmlPullParser parser, int depth); static CharSequence parseContentDepth(XmlPullParser parser, int depth, boolean fullNamespaces); static Presence parsePresence(XmlPullParser parser); static Presence parsePresence(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static IQ parseIQ(XmlPullParser parser); static IQ parseIQ(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static Collection<String> parseMechanisms(XmlPullParser parser); static Compress.Feature parseCompressionFeature(XmlPullParser parser); static Map<String, String> parseDescriptiveTexts(XmlPullParser parser, Map<String, String> descriptiveTexts); static StreamError parseStreamError(XmlPullParser parser); static StreamError parseStreamError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static StanzaError parseError(XmlPullParser parser); static StanzaError parseError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static ExtensionElement parseExtensionElement(String elementName, String namespace,
                    XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static StartTls parseStartTlsFeature(XmlPullParser parser); static Session.Feature parseSessionFeature(XmlPullParser parser); static void addExtensionElement(StanzaBuilder<?> stanzaBuilder, XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static void addExtensionElement(StanzaBuilder<?> stanzaBuilder, XmlPullParser parser, String elementName,
            String namespace, XmlEnvironment outerXmlEnvironment); static void addExtensionElement(Stanza packet, XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static void addExtensionElement(Stanza packet, XmlPullParser parser, String elementName,
            String namespace, XmlEnvironment outerXmlEnvironment); static void addExtensionElement(Collection<ExtensionElement> collection, XmlPullParser parser, XmlEnvironment outerXmlEnvironment); static void addExtensionElement(Collection<ExtensionElement> collection, XmlPullParser parser,
                    String elementName, String namespace, XmlEnvironment outerXmlEnvironment);  }### Answer:
@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()); }