node.subscribe("subid1", client);
node.subscribe("subid2", client);
ResponseStanzaContainer result = sendStanza(sg.getStanza(client, pubsubService, "id123", "news"), true);
assertTrue(result.hasResponse());
IQStanza response = new IQStanza(result.getResponseStanza());
assertEquals(IQStanzaType.ERROR.value(),response.getType());
assertTrue(node.isSubscribed(client));
assertEquals(2, node.countSubscriptions(client)); // still 2 subscriptions
assertEquals("id123", response.getAttributeValue("id")); // IDs must match
XMLElement error = response.getInnerElementsNamed("error").get(0); //jump directly to the error part
assertEquals("error", error.getName());
assertEquals("modify", error.getAttributeValue("type"));
List<XMLElement> errorContent = error.getInnerElements();
assertEquals(2, errorContent.size());