" <item action='deny' order='15'/>\n" +
" </list>\n" +
"</query>\n" +
"</iq>\n";
IQ iq = unmarshal(xml, IQ.class);
Privacy privacy = iq.getExtension(Privacy.class);
Assert.assertNotNull(privacy);
Assert.assertEquals(privacy.getPrivacyLists().size(), 1);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getName(), "private");
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().size(), 2);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(0).getType(), PrivacyRule.Type.SUBSCRIPTION);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(0).getValue(), "both");
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(0).getAction(), PrivacyRule.Action.ALLOW);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(0).getOrder(), 10);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(1).getAction(), PrivacyRule.Action.DENY);
Assert.assertEquals(privacy.getPrivacyLists().get(0).getPrivacyRules().get(1).getOrder(), 15);
}