public static TConfigNodeLocation generateTConfigNodeLocation(
      int nodeId, ConfigNodeWrapper configNodeWrapper) {
    return new TConfigNodeLocation(
        nodeId,
        new TEndPoint(configNodeWrapper.getIp(), configNodeWrapper.getPort()),
        new TEndPoint(configNodeWrapper.getIp(), configNodeWrapper.getConsensusPort()));
  }
Generate a PatternTree and serialize it into a ByteBuffer
integration-test/src/test/java/org/apache/iotdb/confignode/it/utils/ConfigNodeTestUtils.java