" <affiliation node='node6' affiliation='owner'/>\n" +
" </affiliations>\n" +
" </pubsub>\n" +
"</iq>";
IQ iq = unmarshal(xml, IQ.class);
PubSub pubSub = iq.getExtension(PubSub.class);
Assert.assertNotNull(pubSub);
Assert.assertNotNull(pubSub.getAffiliations());
Assert.assertEquals(pubSub.getAffiliations().size(), 4);
Assert.assertEquals(pubSub.getAffiliations().get(0).getNode(), "node1");
Assert.assertEquals(pubSub.getAffiliations().get(0).getAffiliationState(), AffiliationState.OWNER);
Assert.assertEquals(pubSub.getAffiliations().get(1).getAffiliationState(), AffiliationState.PUBLISHER);
Assert.assertEquals(pubSub.getAffiliations().get(2).getAffiliationState(), AffiliationState.OUTCAST);
}