public void shouldOrderByGroupedFirst() {
final RosterGroup myGroup = new RosterGroup(eventBus, "myGroup");
myGroup.add(RosterItemHelper.createItem("test2@test", "test2", false));
myGroup.add(RosterItemHelper.createItem("test1@test", "test1", false, "other"));
myGroup.add(RosterItemHelper.createItem("test3@test", "test3", false, "myGroup"));
final RosterItem firstItemNotSorted = myGroup.getItemList(null).get(0);
assertFalse("test3".equals(firstItemNotSorted.getName()));
final RosterItem firstItemSorted = myGroup.getItemList(RosterItemsOrder.groupedFirst).get(0);
assertEquals("test3", firstItemSorted.getName());
}