public static void testKeyProvider(final Configuration conf) throws IOException {
    String providerClassName =
      conf.get(HConstants.CRYPTO_KEYPROVIDER_CONF_KEY, KeyStoreKeyProvider.class.getName());
    Boolean result = keyProviderResults.get(providerClassName);
    if (result == null) {
      try {
        Encryption.getKeyProvider(conf);
        keyProviderResults.put(providerClassName, true);
      } catch (Exception e) { // most likely a RuntimeException
        keyProviderResults.put(providerClassName, false);
        throw new IOException(
          "Key provider " + providerClassName + " failed test: " + e.getMessage(), e);
      }
    } else if (!result) {
      throw new IOException("Key provider " + providerClassName + " previously failed test");
    }
  }
Check that the configured key provider can be loaded and initialized, or throw an exception.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/EncryptionTest.java