static ICachedMNode virtualTriangleMTree(int size, String sgPath) throws MetadataException {
    String[] sgPathNodes = PathUtils.splitPathToDetachedNodes(sgPath);
    ICachedMNode upperNode = null;
    for (String name : sgPathNodes) {
      upperNode = nodeFactory.createInternalMNode(upperNode, name);
    }
    ICachedMNode internalNode = nodeFactory.createDatabaseDeviceMNode(upperNode, "vRoot1");

    for (int idx = 0; idx < size; idx++) {
      String measurementId = "mid" + idx;
      IMeasurementSchema schema = new MeasurementSchema(measurementId, TSDataType.FLOAT);
      IMeasurementMNode<ICachedMNode> mNode =
          nodeFactory.createMeasurementMNode(
              internalNode.getAsDeviceMNode(), measurementId, schema, measurementId + "als");
      internalNode.addChild(mNode.getAsMNode());
    }

    ICachedMNode curNode = internalNode;
    for (int idx = 0; idx < size; idx++) {
      String nodeName = "int" + idx;
      ICachedMNode newNode = nodeFactory.createDeviceMNode(curNode, nodeName).getAsMNode();
      curNode.addChild(newNode);
      curNode = newNode;
    }

    for (int idx = 0; idx < 1000; idx++) {
      IMeasurementSchema schema = new MeasurementSchema("finalM" + idx, TSDataType.FLOAT);
      IMeasurementMNode<ICachedMNode> mNode =
          nodeFactory.createMeasurementMNode(
              internalNode.getAsDeviceMNode(), "finalM" + idx, schema, "finalals" + idx);
      curNode.addChild(mNode.getAsMNode());
    }
    IMeasurementSchema schema = new MeasurementSchema("finalM", TSDataType.FLOAT);
    IMeasurementMNode<ICachedMNode> mNode =
        nodeFactory.createMeasurementMNode(
            internalNode.getAsDeviceMNode(), "finalM", schema, "finalals");
    curNode.addChild(mNode.getAsMNode());
    upperNode.addChild(internalNode);
    return internalNode;
  }
related methods shall be merged further: {@linkplain SchemaFile#reEstimateSegSize}
,{@linkplain PageManager#reEstimateSegSize}
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/mtree/schemafile/SchemaFileTest.java