@Override
    public boolean engineContainsAlias(String alias) {
      if (failuresLeft > 0) {
        failuresLeft = failuresLeft - 1;
        throw new NullPointerException("something went wrong");
      }
      failuresLeft = failuresInARow;
      return keys.containsKey(alias);
    }
A fake KeyStoreSpi implementation that may raise a NullPointerException in engineContainsAlias.

<p>This is added because of b/167402931.
java_src/src/main/java/com/google/crypto/tink/integration/android/internal/FakeAndroidKeystoreProvider.java