AbstractStanzaGenerator sg = getDefaultStanzaGenerator();
node.subscribe("id", client);
ResponseStanzaContainer result = sendStanza(sg.getStanza(client, pubsubService, "id123", "news"), true);
assertTrue(result.hasResponse());
IQStanza response = new IQStanza(result.getResponseStanza());
assertEquals(IQStanzaType.RESULT.value(), response.getType());
assertEquals("id123", response.getAttributeValue("id")); // IDs must match
// get the subscription Element
XMLElement pub = response.getFirstInnerElement().getFirstInnerElement();
XMLElement item = pub.getFirstInnerElement();
assertEquals("publish", pub.getName());
assertEquals("news", pub.getAttributeValue("node"));
assertNotNull(item); // should be present