code: public AuthMethod getAcceptableAuthMethod(Set<Class> acceptableAuthMethodClasses) throws NexmoUnacceptableAuthException {
          for (AuthMethod availableAuthMethod : this.authList) {
              if (acceptableAuthMethodClasses.contains(availableAuthMethod.getClass())) {
                  return availableAuthMethod;
              }
          }
          throw new NexmoUnacceptableAuthException(this.authList, acceptableAuthMethodClasses);
      }
docs: Obtain an {@link AuthMethod} instance for a set of acceptable AuthMethod classes.
  
  @param acceptableAuthMethodClasses A Set of AuthMethod classes which are suitable for the target REST endpoint.
  
  @return the preferred AuthMethod from the provided set of acceptable AuthMethod classes
  
  @throws NexmoUnacceptableAuthException if no appropriate AuthMethod is held by this AuthCollection