private void waitForModification(AuthManager authManager, long sleep) throws Exception {
    final long mtime = authManager.getMTime();
    // Wait for the update to propagate
    UTIL.waitFor(10000, 100, new Predicate<Exception>() {
      @Override
      public boolean evaluate() throws Exception {
        return authManager.getMTime() > mtime;
      }
    });
    Thread.sleep(sleep);
  }
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