code: private void ensureValidACLAuthorization(final FedoraResource resource, final Model inputModel) {
          if (resource.isAcl()) {
              final Set<Node> uniqueAuthSubjects = new HashSet<>();
              inputModel.listStatements().forEachRemaining((final Statement s) -> {
                  LOGGER.debug("statement: s={}, p={}, o={}", s.getSubject(), s.getPredicate(), s.getObject());
                  final Node subject = s.getSubject().asNode();
                  // If subject is Authorization Hash Resource, add it to the map with its accessTo/accessToClass status.
                  if (subject.toString().contains("/" + FCR_ACL + "#")) {
                      uniqueAuthSubjects.add(subject);
                  }
              });
              final Graph graph = inputModel.getGraph();
              uniqueAuthSubjects.forEach((final Node subject) -> {
                  if (graph.contains(subject, WEBAC_ACCESS_TO_URI, Node.ANY) &&
                          graph.contains(subject, WEBAC_ACCESS_TO_CLASS_URI, Node.ANY)) {
                      throw new ACLAuthorizationConstraintViolationException(
                          MessageFormat.format(
                                  "Using both accessTo and accessToClass within " +
                                          "a single Authorization is not allowed: {0}.",
                                  subject.toString().substring(subject.toString().lastIndexOf("#"))));
                  } else if (!(graph.contains(subject, WEBAC_ACCESS_TO_URI, Node.ANY) ||
                          graph.contains(subject, WEBAC_ACCESS_TO_CLASS_URI, Node.ANY))) {
                      inputModel.add(createDefaultAccessToStatement(subject.toString()));
                  }
              });
          }
      }
docs: This method does two things:
  - Throws an exception if an authorization has both accessTo and accessToClass
  - Adds a default accessTo target if an authorization has neither accessTo nor accessToClass
  
  @param resource the fedora resource
  @param inputModel to be checked and updated