### Question:
ParseStreamManagement { public static Resumed resumed(XmlPullParser parser) throws XmlPullParserException, IOException { ParserUtils.assertAtStartTag(parser); long h = ParserUtils.getLongAttribute(parser, "h"); String previd = parser.getAttributeValue("", "previd"); parser.next(); ParserUtils.assertAtEndTag(parser); return new Resumed(h, previd); }  static Enabled enabled(XmlPullParser parser); static Failed failed(XmlPullParser parser); static Resumed resumed(XmlPullParser parser); static AckAnswer ackAnswer(XmlPullParser parser); static AckRequest ackRequest(XmlPullParser parser);  }### Answer:
@Test public void testParseResumed() throws Exception { long handledPackets = 42; String previousID = "zid615d9"; String resumedStanza = XMLBuilder.create("resumed") .a("xmlns", "urn:xmpp:sm:3") .a("h", String.valueOf(handledPackets)) .a("previd", previousID) .asString(outputProperties); StreamManagement.Resumed resumedPacket = ParseStreamManagement.resumed( PacketParserUtils.getParserFor(resumedStanza)); assertNotNull(resumedPacket); assertEquals(handledPackets, resumedPacket.getHandledCount()); assertEquals(previousID, resumedPacket.getPrevId()); }