@Test
public void testGetProviderViaURI() throws Exception {

  Configuration conf = new Configuration(false);
  final Path jksPath = new Path(testRootDir.toString(), "test.jks");
  URI uri = new URI(JavaKeyStoreProvider.SCHEME_NAME + "://file" + jksPath.toUri());
  KeyProvider kp = KeyProviderFactory.get(uri, conf);
  Assert.assertNotNull(kp);
  Assert.assertEquals(JavaKeyStoreProvider.class, kp.getClass());
  uri = new URI("foo://bar");
  kp = KeyProviderFactory.get(uri, conf);
  Assert.assertNull(kp);
}