@Test
public void addAndRemoveGroupMember() {
mockAuthentication("userWithStatus@ippon.fr");
User user = userService.getUserByLogin("userWithStatus@ippon.fr");
assertEquals(0, groupService.getGroupsForUser(user).size());
String groupName = "Group name";
String groupDescription = "Group description";
boolean publicGroup = true;
groupService.createGroup(groupName, groupDescription, publicGroup);
Collection<Group> groups = groupService.getGroupsForUser(user);
assertEquals(1, groups.size());
Group group = groups.iterator().next();
String groupId = group.getGroupId();
User member = userService.getUserByLogin("userWhoPostStatus@ippon.fr");
assertEquals(1, groupService.getGroupsForUser(user).size());
assertEquals(0, groupService.getGroupsForUser(member).size());
Collection<UserGroupDTO> members = groupService.getMembersForGroup(groupId, user.getLogin());