@Test
  public void testGroupAlignedSeries() throws MetadataException {
    List<PartialPath> pathList = new ArrayList<>();
    MeasurementPath path1 =
        new MeasurementPath(new PartialPath("root.sg.device1.s1"), TSDataType.INT32);
    pathList.add(path1);
    MeasurementPath path2 =
        new MeasurementPath(new PartialPath("root.sg.device1.s2"), TSDataType.INT32);
    pathList.add(path2);
    MeasurementPath path3 =
        new MeasurementPath(new PartialPath("root.sg.aligned_device1.s1"), TSDataType.INT32);
    path3.setUnderAlignedEntity(true);
    pathList.add(path3);
    MeasurementPath path4 =
        new MeasurementPath(new PartialPath("root.sg.aligned_device2.s1"), TSDataType.INT32);
    path4.setUnderAlignedEntity(true);
    pathList.add(path4);
    MeasurementPath path5 =
        new MeasurementPath(new PartialPath("root.sg.aligned_device1.s2"), TSDataType.INT32);
    path5.setUnderAlignedEntity(true);
    pathList.add(path5);
    MeasurementPath path6 =
        new MeasurementPath(new PartialPath("root.sg.aligned_device2.s2"), TSDataType.INT32);
    path6.setUnderAlignedEntity(true);
    pathList.add(path6);

    AlignedPath alignedPath1 = new AlignedPath(path3);
    alignedPath1.addMeasurement(path5);
    AlignedPath alignedPath2 = new AlignedPath(path4);
    alignedPath2.addMeasurement(path6);

    List<PartialPath> result = MetaUtils.groupAlignedSeries(pathList);
    assertTrue(result.contains(path1));
    assertTrue(result.contains(path2));
    assertTrue(result.contains(alignedPath1));
    assertTrue(result.contains(alignedPath2));
  }
TODO: remove this after delete {@linkplain MetaUtils#groupAlignedPaths}
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/MetaUtilsTest.java