" </item>\n" +
" </query>\n" +
"</iq>\n";
IQ iq = unmarshal(xml, IQ.class);
Search search = iq.getExtension(Search.class);
Assert.assertNotNull(search);
Assert.assertEquals(search.getItems().size(), 2);
Assert.assertEquals(search.getItems().get(0).getJid(), Jid.valueOf("juliet@capulet.com"));
Assert.assertEquals(search.getItems().get(0).getFirst(), "Juliet");
Assert.assertEquals(search.getItems().get(0).getLast(), "Capulet");
Assert.assertEquals(search.getItems().get(0).getNick(), "JuliC");
Assert.assertEquals(search.getItems().get(0).getEmail(), "juliet@shakespeare.lit");
Assert.assertEquals(search.getItems().get(1).getJid(), Jid.valueOf("tybalt@shakespeare.lit"));
Assert.assertEquals(search.getItems().get(1).getFirst(), "Tybalt");
Assert.assertEquals(search.getItems().get(1).getLast(), "Capulet");
Assert.assertEquals(search.getItems().get(1).getNick(), "ty");
Assert.assertEquals(search.getItems().get(1).getEmail(), "tybalt@shakespeare.lit");
}