" <subscription node='node6' jid='francisco@denmark.lit' subscription='subscribed' subid='004-yyy'/>\n" +
" </subscriptions>\n" +
" </pubsub>\n" +
"</iq>\n";
IQ iq = unmarshal(xml, IQ.class);
PubSub pubSub = iq.getExtension(PubSub.class);
Assert.assertNotNull(pubSub);
Assert.assertNotNull(pubSub.getSubscriptions());
Assert.assertEquals(pubSub.getSubscriptions().size(), 5);
Assert.assertEquals(pubSub.getSubscriptions().get(0).getNode(), "node1");
Assert.assertEquals(pubSub.getSubscriptions().get(0).getJid(), Jid.valueOf("francisco@denmark.lit"));
Assert.assertEquals(pubSub.getSubscriptions().get(0).getSubscriptionState(), SubscriptionState.SUBSCRIBED);
Assert.assertEquals(pubSub.getSubscriptions().get(2).getSubscriptionState(), SubscriptionState.UNCONFIGURED);
Assert.assertEquals(pubSub.getSubscriptions().get(3).getSubId(), "123-abc");
}