private void processEvent(WatchedEvent event) {
    TraceUtil.trace(() -> {
      switch (event.getType()) {
        // If event type is NONE, this is a connection status change
        case None: {
          connectionEvent(event);
          break;
        }

        // Otherwise pass along to the listeners
        case NodeCreated: {
          for (ZKListener listener : listeners) {
            listener.nodeCreated(event.getPath());
          }
          break;
        }

        case NodeDeleted: {
          for (ZKListener listener : listeners) {
            listener.nodeDeleted(event.getPath());
          }
          break;
        }

        case NodeDataChanged: {
          for (ZKListener listener : listeners) {
            listener.nodeDataChanged(event.getPath());
          }
          break;
        }

        case NodeChildrenChanged: {
          for (ZKListener listener : listeners) {
            listener.nodeChildrenChanged(event.getPath());
          }
          break;
        }
        default:
          LOG.error("Invalid event of type {} received for path {}. Ignoring.", event.getState(),
            event.getPath());
      }
    }, "ZKWatcher.processEvent: " + event.getType() + " " + event.getPath());
  }
Get the znodePaths.
<p>
Mainly used for mocking as mockito can not mock a field access.
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java