### Question:
KMSACLs implements Runnable, KeyACLs { @Override public boolean hasAccess(Type type, UserGroupInformation ugi, String clientIp) { boolean access = acls.get(type).isUserAllowed(ugi); if (access) { AccessControlList blacklist = blacklistedAcls.get(type); access = (blacklist == null) || !blacklist.isUserInList(ugi); } return access; } KMSACLs(Configuration conf);  KMSACLs(); @Override void run(); @Override synchronized void startReloader(); @Override synchronized void stopReloader(); @Override boolean hasAccess(Type type, UserGroupInformation ugi, String clientIp); @Override void assertAccess(Type aclType,
      UserGroupInformation ugi, KMSOp operation, String key, String clientIp); @Override boolean hasAccessToKey(String keyName, UserGroupInformation ugi,
      KeyOpType opType); @Override boolean isACLPresent(String keyName, KeyOpType opType); static final String ACL_DEFAULT; static final int RELOADER_SLEEP_MILLIS; }### Answer:
@Test public void testDefaults() { KMSACLs acls = new KMSACLs(new Configuration(false)); for (Type type : Type.values()) { Assert.assertTrue(acls.hasAccess(type, UserGroupInformation.createRemoteUser("foo"), ipAddress)); } }
@Test public void testCustom() { Configuration conf = new Configuration(false); for (Type type : Type.values()) { conf.set(type.getAclConfigKey(), type.toString() + " "); } KMSACLs acls = new KMSACLs(conf); for (Type type : Type.values()) { Assert.assertTrue(acls.hasAccess(type, UserGroupInformation.createRemoteUser(type.toString()), ipAddress)); Assert.assertFalse(acls.hasAccess(type, UserGroupInformation.createRemoteUser("foo"), ipAddress)); } }