@Test
  public void testActivateAndDropEmptyTemplate() throws Exception {
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {
      statement.execute("CREATE DEVICE TEMPLATE e_t;");
      statement.execute("SET DEVICE TEMPLATE e_t TO root.sg1.t.d1;");
      statement.execute("insert into root.sg1.t.d2(timestamp,s1) values(now(),false);");
      statement.execute("CREATE TIMESERIES OF DEVICE TEMPLATE ON root.sg1.t.d1;");
      try (ResultSet resultSet = statement.executeQuery("show nodes in device template e_t")) {
        Assert.assertFalse(resultSet.next());
      }
      try (ResultSet resultSet = statement.executeQuery("show paths set device template e_t")) {
        Assert.assertTrue(resultSet.next());
        Assert.assertFalse(resultSet.next());
      }
      statement.execute("DEACTIVATE DEVICE TEMPLATE FROM root.sg1.t.d1;");
      statement.execute("UNSET DEVICE TEMPLATE e_t FROM root.sg1.t.d1;");
      try (ResultSet resultSet = statement.executeQuery("show paths set device template e_t")) {
        Assert.assertFalse(resultSet.next());
      }
    }
  }
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