private Method loadMethod(Class<?> clz, String name, Class<?>... classes) throws Exception {
      Method method;
      try {
        method = clz.getMethod(name, classes);
      } catch (SecurityException e) {
        fail("security exception caught for: " + name + " in " + clz.getCanonicalName());
        throw e;
      } catch (NoSuchMethodException e) {
        LOG.error("Failed to load the " + name + ": " + e);
        fail("no such method: " + name + " in " + clz.getCanonicalName());
        throw e;
      }
      return method;
    }
Determine if we can load the necessary CredentialProvider classes. Only loaded the first
time, so subsequent invocations of this method should return fast.
@return True if the CredentialProvider classes/methods are available, false otherwise.
hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java