@Test
public void shouldRequestUpdateItem() {
session.receives("<iq type='set' id='theId'><query xmlns='jabber:iq:roster'>"
+ "<item jid='friend@domain' name='MyFriend'><group>Group1</group><group>Group2</group>" + "</item></query></iq>");
final RosterItem item = roster.getItemByJID(uri("friend@domain"));
assertNotNull(item);
RosterItem upd = new RosterItem(uri("no@one"), null, "name", null);
upd.setGroups("group");
roster.requestUpdateItem(upd);
session.verifySent("<iq type='result' id='theId' />");
upd = new RosterItem(uri("friend@domain"), null, "MyOldFriend", null);
upd.setGroups("Group1", "Group3");
roster.requestUpdateItem(upd);
session.verifyIQSent("<iq type='set'><query xmlns='jabber:iq:roster'>"
+ "<item jid='friend@domain' name='MyOldFriend'><group>Group1</group><group>Group3</group>" + "</item></query></iq>");
}