@Test
  public void testGetMatchedDevicesWithSpecialPattern2() throws Exception {
    final ISchemaRegion schemaRegion = getSchemaRegion("root.test", 0);

    SchemaRegionTestUtil.createSimpleTimeSeriesByList(
        schemaRegion,
        Arrays.asList(
            "root.test.abc57.bcde22.def89.efg1",
            "root.test.abc57.bcde22.def89.efg2",
            "root.test.abc57.bcd22.def89.efg1",
            "root.test.abc57.bcd22.def89.efg2"));

    // case1: show devices root.**.*b*.*
    final List<IDeviceSchemaInfo> expectedList =
        Arrays.asList(
            new ShowDevicesResult("root.test.abc57.bcde22.def89", false, -1),
            new ShowDevicesResult("root.test.abc57.bcd22.def89", false, -1));
    final List<IDeviceSchemaInfo> actualResult =
        SchemaRegionTestUtil.getMatchedDevices(schemaRegion, new PartialPath("root.**.*b*.*"));
    // Compare hash sets because the order does not matter.
    final Set<IDeviceSchemaInfo> expectedHashset = new HashSet<>(expectedList);
    final Set<IDeviceSchemaInfo> actualHashset = new HashSet<>(actualResult);
    Assert.assertEquals(expectedHashset, actualHashset);

    // case2: show time series root.**.*e*.*e*
    List<ITimeSeriesSchemaInfo> result =
        SchemaRegionTestUtil.showTimeseries(schemaRegion, new PartialPath("root.**.*e*.*e*"));
    final Set<String> expectedPathList =
        new HashSet<>(
            Arrays.asList(
                "root.test.abc57.bcde22.def89.efg1",
                "root.test.abc57.bcde22.def89.efg2",
                "root.test.abc57.bcd22.def89.efg1",
                "root.test.abc57.bcd22.def89.efg2"));
    final int expectedSize = expectedPathList.size();
    Assert.assertEquals(expectedSize, result.size());
    Set<String> actualPathList = new HashSet<>();
    for (int index = 0; index < expectedSize; index++) {
      actualPathList.add(result.get(index).getFullPath());
    }
    Assert.assertEquals(expectedPathList, actualPathList);

    // case3: show time series root.**.*e*
    result = SchemaRegionTestUtil.showTimeseries(schemaRegion, new PartialPath("root.**.*e*"));
    Assert.assertEquals(expectedSize, result.size());
    actualPathList = new HashSet<>();
    for (int index = 0; index < expectedSize; index++) {
      actualPathList.add(result.get(index).getFullPath());
    }
    Assert.assertEquals(expectedPathList, actualPathList);
  }
Test {@link ISchemaRegion#constructSchemaBlackList}, {@link
ISchemaRegion#rollbackSchemaBlackList}, {@link ISchemaRegion#fetchSchemaBlackList} and{@link
ISchemaRegion#deleteTimeseriesInBlackList}
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionBasicTest.java