### Question:
DistributedKeyManager extends AbstractKeyManager implements ResourceListener<KeyIdentifier> { static List<ACL> getACLs(CConfiguration cConf) { if (SecurityUtil.isKerberosEnabled(cConf)) { return ZooDefs.Ids.CREATOR_ALL_ACL; } LOG.warn("Not adding ACLs on keys in ZooKeeper as Kerberos is not enabled"); return ZooDefs.Ids.OPEN_ACL_UNSAFE; } DistributedKeyManager(CConfiguration conf, Codec<KeyIdentifier> codec, ZKClient zookeeper);  DistributedKeyManager(CConfiguration conf, Codec<KeyIdentifier> codec, ZKClient zookeeper, List<ACL> acls); @Override void shutDown(); @Override synchronized void onUpdate(); @Override synchronized void onResourceUpdate(String name, KeyIdentifier instance); @Override void onResourceDelete(String name); @Override void onError(String name, Throwable throwable);  }### Answer:
@Test public void testGetACLs() throws Exception { CConfiguration kerbConf = CConfiguration.create(); kerbConf.set(Constants.Security.KERBEROS_ENABLED, "true"); kerbConf.set(Constants.Security.CFG_CDAP_MASTER_KRB_PRINCIPAL, "prinicpal@REALM.NET"); kerbConf.set(Constants.Security.CFG_CDAP_MASTER_KRB_KEYTAB_PATH, "/path/to/keytab"); Assert.assertEquals(ZooDefs.Ids.CREATOR_ALL_ACL, DistributedKeyManager.getACLs(kerbConf)); CConfiguration noKerbConf = CConfiguration.create(); noKerbConf.unset(Constants.Security.CFG_CDAP_MASTER_KRB_PRINCIPAL); Assert.assertEquals(ZooDefs.Ids.OPEN_ACL_UNSAFE, DistributedKeyManager.getACLs(noKerbConf)); }