@Test
public void getUsersTest() {

    // User user = geoStoreClient.getUser(1);
    try {
        UserList users = geoStoreClient.getUsers(1, 1);
        UserGroup ug1 = new UserGroup();
        ug1.setGroupName("testGroup1");
        ug1.setDescription("testGroup1-Description");
        UserGroup ug2 = new UserGroup();
        ug2.setGroupName("testGroup2");
        ug2.setDescription("testGroup2-Description");
        UserGroup ug3 = new UserGroup();
        ug3.setGroupName("testGroup3");
        ug3.setDescription("testGroup3-Description");
        geoStoreClient.insertUserGroup(ug1);
        geoStoreClient.insertUserGroup(ug2);
        geoStoreClient.insertUserGroup(ug3);
        Set<UserGroup> ugs = new HashSet<UserGroup>();
        ugs.add(ug1);
        ugs.add(ug2);
        ugs.add(ug3);
        User user = new User();
        user.setName("testuser111");
        user.setRole(Role.USER);
        user.setNewPassword("testpw");
        UserAttribute email = new UserAttribute();
        email.setName("email");
        email.setValue("test@geo-solutions.it");
        user.setGroups(ugs);
        geoStoreClient.insert(user);
        users = geoStoreClient.getUsers(0, 3);
        for(RESTUser u : users.getList()){
            if("testuser111".equals(u.getName())){
                assertEquals(3,u.getGroupsNames().size());     
            }
        }
        
    } catch (Exception e) {
        fail();
    }
}