@Override
    public JcePrimitiveT getInstance(String algorithm, List<Provider> preferredProviders)
        throws GeneralSecurityException {
      for (Provider provider : preferredProviders) {
        try {
          return this.jceFactory.getInstance(algorithm, provider);
        } catch (Exception e) {
          // Provider failed to provide instance, but we can continue with other providers.
        }
      }
      return getInstance(algorithm);
    }
The default policy, which uses the JDK priority for providers. If a list of preferred providers
is provided, then these will be used first in the order they are given.
java_src/src/main/java/com/google/crypto/tink/subtle/EngineFactory.java