@SuppressWarnings("unchecked")
    protected List<Object> getCredentialProviders(Configuration conf) {
      // Call CredentialProviderFactory.getProviders(Configuration)
      Object providersObj;
      try {
        providersObj = getProvidersMethod.invoke(hadoopCredProviderFactory, conf);
      } catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) {
        LOG.error("Failed to invoke: " + getProvidersMethod.getName() + ": " + e);
        return null;
      }

      // Cast the Object to List<Object> (actually List<CredentialProvider>)
      try {
        return (List<Object>) providersObj;
      } catch (ClassCastException e) {
        return null;
      }
    }
Wrapper to fetch the configured {@code List<CredentialProvider>}s. Configuration with
GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS defined
@return List of CredentialProviders, or null if they could not be loaded
hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java