code: public CMASpaceMembership addRole(CMALink role) {
      if (role == null) {
        throw new IllegalArgumentException("Role cannot be null!");
      }
  
      if (roles == null) {
        roles = new ArrayList<CMALink>();
      }
  
      this.roles.add(role);
      return this;
    }
docs: Add a role to the list of roles.
  
  @param role the role to be used, needs to be not null.
  @return this membership for ease of chaining.
  @throws IllegalArgumentException if role is null.