/**
   * Validates the acl assignment changes. It is not valid acl assignment change, when an acl entry
   * contains more than one privilege or privileges other than USE if the tenant provided in the acl
   * entry is not a valid tenant org.
   *
   * @param changes acl assignment changes to validated.
   */
  private void validateAclAssignments(ACLAssignmentChanges changes) {
    if (changes == null) {
      throw APIException.badRequests.requiredParameterMissingOrEmpty("ACLAssignmentChanges");
    }

    // Make sure at least one acl entry either in the add or remove
    // list.
    if (CollectionUtils.isEmpty(changes.getAdd()) && CollectionUtils.isEmpty(changes.getRemove())) {
      throw APIException.badRequests.requiredParameterMissingOrEmpty("ACLAssignmentChanges");
    }

    validateAclEntries(changes.getAdd());
    validateAclEntries(changes.getRemove());
  }