private void writeToZookeeper(ZKPermissionWatcher watcher,
    ListMultimap<String, UserPermission> permissions) {
    byte[] serialized =
      PermissionStorage.writePermissionsAsBytes(permissions, UTIL.getConfiguration());
    watcher.writeToZookeeper(TEST_TABLE.getName(), serialized);
  }
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