### Question:
PacketParserUtils { @SuppressWarnings("unchecked") public static <S extends Stanza> S parseStanza(String stanza) throws XmlPullParserException, SmackParsingException, IOException { return (S) parseStanza(getParserFor(stanza), XmlEnvironment.EMPTY); }  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 multipleMessageBodiesParsingTest() throws Exception { String control = XMLBuilder.create("message") .namespace(StreamOpen.CLIENT_NAMESPACE) .a("from", "romeo@montague.lit/orchard") .a("to", "juliet@capulet.lit/balcony") .a("id", "zid615d9") .a("type", "chat") .a("xml:lang", "en") .e("body") .t("This is a test of the emergency broadcast system, 1.") .up() .e("body") .a("xml:lang", "ru") .t("This is a test of the emergency broadcast system, 2.") .up() .e("body") .a("xml:lang", "sp") .t("This is a test of the emergency broadcast system, 3.") .asString(outputProperties); Stanza message = PacketParserUtils.parseStanza(control); assertXmlSimilar(control, message.toXML()); }