@BeforeClass
  public static void beforeClass() throws Exception {
    // setup configuration
    Configuration conf = UTIL.getConfiguration();
    SecureTestUtil.enableSecurity(conf);

    // start minicluster
    UTIL.startMiniCluster();
    AUTH_A = new AuthManager(conf);
    AUTH_B = new AuthManager(conf);
    WATCHER_A = new ZKPermissionWatcher(
      new ZKWatcher(conf, "TestZKPermissionsWatcher_1", ABORTABLE), AUTH_A, conf);
    WATCHER_B = new ZKPermissionWatcher(
      new ZKWatcher(conf, "TestZKPermissionsWatcher_2", ABORTABLE), AUTH_B, conf);
    WATCHER_A.start();
    WATCHER_B.start();
  }
Test the reading and writing of access permissions to and from zookeeper.
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionWatcher.java