@Test
public void testFactoryErrors() throws Exception {

  Configuration conf = new Configuration();
  conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, "unknown:///");
  try {
    List<CredentialProvider> providers = 
        CredentialProviderFactory.getProviders(conf);
    assertTrue("should throw!", false);
  } catch (IOException e) {
    assertEquals("No CredentialProviderFactory for unknown:/// in " +
        CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH,
        e.getMessage());
  }
}