@RequestMapping(method = RequestMethod.GET, value = "/owner/")
 public List<UserGroupDTO> loadUserGroupsWhereUserIsOwner(
     @PathVariable("userId") final int userId, final Principal principal) {
   return dtoService.transformUserGroups(
       userGroupService.loadUserGroupsWhereUserIsOwner(userService.load(userId)),
       getUser(principal));
 }
 @RequestMapping(method = RequestMethod.GET, value = "/")
 public List<UserGroupEditDTO> userGroupList(final @PathVariable("userId") int userId) {
   final List<UserGroup> userGroups =
       userGroupService.loadUserGroupsWhereUserIsOwner(userService.load(userId));
   final Function<UserGroup, UserGroupEditDTO> mapper =
       userGroup -> {
         final UserGroupEditDTO dto = new UserGroupEditDTO();
         dto.setUserGroupId(userGroup.getId());
         dto.setUserGroupName(userGroup.getGroupName());
         dto.setCupIds(
             userGroupService
                 .loadCups(userGroup)
                 .stream()
                 .map(AbstractEntity::getId)
                 .collect(Collectors.toList()));
         return dto;
       };
   return userGroups.stream().map(mapper).collect(Collectors.toList());
 }