### Question:
ConfigurationBuilder { protected String getEncryptionKeyProviderUri() { String encryptionKeyProviderUri = getProperty("hdfs-site", "dfs.encryption.key.provider.uri"); return encryptionKeyProviderUri; } ConfigurationBuilder(ViewContext context);  ConfigurationBuilder(ViewContext context, Map<String, String> customProperties); void setAuthParams(Map<String, String> authParams); Configuration buildConfig(); Map<String, String> buildAuthenticationConfig(); static final String CORE_SITE; static final String HDFS_SITE; static final String DEFAULT_FS_INSTANCE_PROPERTY; static final String DEFAULT_FS_CLUSTER_PROPERTY; static final String NAMESERVICES_INSTANCE_PROPERTY; static final String NAMESERVICES_CLUSTER_PROPERTY; static final String HA_NAMENODES_INSTANCE_PROPERTY; static final String HA_NAMENODES_CLUSTER_PROPERTY; static final String NAMENODE_RPC_NN_INSTANCE_PROPERTY; static final String NAMENODE_RPC_NN_CLUSTER_PROPERTY; static final String NAMENODE_HTTP_NN_INSTANCE_PROPERTY; static final String NAMENODE_HTTP_NN_CLUSTER_PROPERTY; static final String NAMENODE_HTTPS_NN_INSTANCE_PROPERTY; static final String NAMENODE_HTTPS_NN_CLUSTER_PROPERTY; static final String FAILOVER_PROXY_PROVIDER_INSTANCE_PROPERTY; static final String FAILOVER_PROXY_PROVIDER_CLUSTER_PROPERTY; static final String UMASK_CLUSTER_PROPERTY; static final String UMASK_INSTANCE_PROPERTY; static final String DFS_WEBHDFS_ENABLED; static final String DFS_HTTP_POLICY; static final String DFS_HTTP_POLICY_HTTPS_ONLY; static final String DFS_NAMENODE_HTTP_ADDERSS; static final String DFS_NAMENODE_HTTPS_ADDERSS; }### Answer:
@Test public void testGetEncryptionKeyProviderUri() throws Exception { String keyProvider = "kms: Cluster cluster = createNiceMock(Cluster.class); expect(cluster.getConfigurationValue("hdfs-site", "dfs.encryption.key.provider.uri")).andReturn(keyProvider); replay(cluster); ViewContext viewContext = createNiceMock(ViewContext.class); expect(viewContext.getCluster()).andReturn(cluster).anyTimes(); Map<String, String> instanceProperties = new HashMap<>(); expect(viewContext.getProperties()).andReturn(instanceProperties).anyTimes(); replay(viewContext); ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(viewContext); String encryptionKeyProviderUri = configurationBuilder.getEncryptionKeyProviderUri(); assertEquals(encryptionKeyProviderUri, keyProvider); }