String xml = "<set xmlns='http://jabber.org/protocol/rsm'>\n" +
" <first index='0'>stpeter@jabber.org</first>\n" +
" <last>peterpan@neverland.lit</last>\n" +
" <count>800</count>\n" +
" </set>";
ResultSet set = unmarshal(xml, ResultSet.class);
Assert.assertNotNull(set);
Assert.assertEquals(set.getFirstItem(), "stpeter@jabber.org");
Assert.assertEquals(set.getFirstItemIndex(), Integer.valueOf(0));
Assert.assertEquals(set.getLastItem(), "peterpan@neverland.lit");
Assert.assertEquals(set.getItemCount(), Integer.valueOf(800));
}