@Test
  public void testShowTemplateSeriesWithFuzzyQuery() throws Exception {
    // test create device template repeatedly
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {
      // set device template
      statement.execute("SET DEVICE TEMPLATE t1 TO root.sg1");
      statement.execute("SET DEVICE TEMPLATE t2 TO root.sg2");
      statement.execute("SET DEVICE TEMPLATE t3 TO root.sg3");
      // activate device template
      statement.execute("create timeseries using device template on root.sg1.d1");
      statement.execute("create timeseries using device template on root.sg2.d2");
      statement.execute("create timeseries using device template on root.sg3.d3");

      Set<String> expectedResult =
          new HashSet<>(
              Arrays.asList(
                  "root.sg1.d1.s1,INT64,TS_2DIFF,LZ4",
                  "root.sg1.d1.s2,DOUBLE,GORILLA,LZ4",
                  "root.sg2.d2.s1,INT64,TS_2DIFF,LZ4",
                  "root.sg2.d2.s2,DOUBLE,GORILLA,LZ4",
                  "root.sg3.d3.s1,INT64,TS_2DIFF,LZ4"));

      try (ResultSet resultSet = statement.executeQuery("SHOW TIMESERIES root.sg*.*.s*")) {
        while (resultSet.next()) {
          String actualResult =
              resultSet.getString(ColumnHeaderConstant.TIMESERIES)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.DATATYPE)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.ENCODING)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.COMPRESSION);
          Assert.assertTrue(expectedResult.contains(actualResult));
          expectedResult.remove(actualResult);
        }
      }
      Assert.assertTrue(expectedResult.isEmpty());
      expectedResult =
          new HashSet<>(
              Arrays.asList(
                  "root.sg1.d1.s1,INT64,TS_2DIFF,LZ4", "root.sg1.d1.s2,DOUBLE,GORILLA,LZ4"));

      try (ResultSet resultSet = statement.executeQuery("SHOW TIMESERIES root.sg1.d1.s*")) {
        while (resultSet.next()) {
          String actualResult =
              resultSet.getString(ColumnHeaderConstant.TIMESERIES)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.DATATYPE)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.ENCODING)
                  + ","
                  + resultSet.getString(ColumnHeaderConstant.COMPRESSION);
          Assert.assertTrue(expectedResult.contains(actualResult));
          expectedResult.remove(actualResult);
        }
      }
      Assert.assertTrue(expectedResult.isEmpty());
    }
  }
Notice that, all test begins with "IoTDB" is integration test. All test which will start the
IoTDB server should be defined as integration test.
integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java