public Map<String, Group> getGroupsForUser(String userId) {
        ApiResponse response = apiRequest(HttpMethod.GET, null, null,
                organizationId, applicationId, "users", userId, "groups");
        Map<String, Group> groupMap = new HashMap<String, Group>();
        if (response != null) {
            List<Group> groups = response.getEntities(Group.class);
            for (Group group : groups) {
                groupMap.put(group.getPath(), group);
            }
        }
        return groupMap;
    }
public Map < String , Group > getGroupsForUser ( String userId ) { ApiResponse response = apiRequest ( HttpMethod . GET , null , null , organizationId , applicationId , "users" , userId , "groups" ) ; Map < String , Group > groupMap = new HashMap < String , Group > ( ) ; if ( response != null ) { List < Group > groups = response . getEntities ( Group . class ) ; for ( Group group : groups ) { groupMap . put ( group . getPath ( ) , group ) ; } } return groupMap ; }
Get the groups for the user.

@param userId
@return a map with the group path as the key and the Group entity as the
value