private Constructor<ZKDistributedNonblockingLock> getConstructorForZkDistributedLock() throws Exception {
    Constructor<?>[] constructors = ZKDistributedNonblockingLock.class.getDeclaredConstructors();
    // Use reflection API to get a private constructor so that we can create a dedicated zookeeper connection.
    for (Constructor<?> constructor : constructors) {
      if ((constructor.getModifiers() & Modifier.PRIVATE) == Modifier.PRIVATE && constructor.getParameterCount() == 10
          && constructor.getParameterTypes()[0] == String.class) {
        constructor.setAccessible(true);
        return (Constructor<ZKDistributedNonblockingLock>) constructor;
      }
    }
    return null;
  }
This is a hacky way to create distributed lock with different zookeeper connection.
@param resource The resource to lock
@param userId The user id for the lock
@param reason The reason to acquire the lock
@param zkConnectionStr The zookeeper server
@return A {@link DistributedLock}.
@throws Exception
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixParticipantTest.java