User user = new User();
user.setName("Test user 1");
user.setEmail("test.user1@linxugrotto.org.uk");
user.setRole("agent");
User createdUser = API.getUsers().createUser(user).getUser();
GroupMembership groupMembership = new GroupMembership();
groupMembership.setUserId(createdUser.getId());
groupMembership.setGroupId(group.getId());
// Create
IndividualGroupMembershipResponse igmr = API.getGroups().createGroupMembership(groupMembership);
Assert.assertTrue(igmr.getGroupMembership().getId() > 0);