KeyProvider { public Configuration getConf() { return conf; } KeyProvider(Configuration conf); Configuration getConf(); static Options options(Configuration conf); boolean isTransient(); abstract KeyVersion getKeyVersion(String versionName
                                            ); abstract List<String> getKeys(); Metadata[] getKeysMetadata(String... names); abstract List<KeyVersion> getKeyVersions(String name); KeyVersion getCurrentKey(String name); abstract Metadata getMetadata(String name); abstract KeyVersion createKey(String name, byte[] material,
                                       Options options); KeyVersion createKey(String name, Options options); abstract void deleteKey(String name); abstract KeyVersion rollNewVersion(String name,
                                             byte[] material
                                            ); void close(); KeyVersion rollNewVersion(String name); abstract void flush(); static String getBaseName(String versionName); static KeyProvider findProvider(List<KeyProvider> providerList,
                                         String keyName); static final String DEFAULT_CIPHER_NAME; static final String DEFAULT_CIPHER; static final String DEFAULT_BITLENGTH_NAME; static final int DEFAULT_BITLENGTH; }
@Test public void testConfiguration() throws Exception { Configuration conf = new Configuration(false); conf.set("a", "A"); MyKeyProvider kp = new MyKeyProvider(conf); Assert.assertEquals("A", kp.getConf().get("a")); }