private void negativeTimestampAggregationTest() {
    String[] expectedHeader = new String[] {"count(root.fans.d0.s0)"};
    String[] retArray = new String[] {"2001,"};
    resultSetEqualTest("SELECT count(s0) FROM root.fans.d0;", expectedHeader, retArray);

    expectedHeader = new String[] {"count(root.fans.d0.s0)"};
    retArray = new String[] {"1999,"};
    resultSetEqualTest(
        "SELECT count(s0) FROM root.fans.d0 WHERE time<-1;", expectedHeader, retArray);

    expectedHeader = new String[] {"min_time(root.fans.d0.s0)"};
    retArray = new String[] {"-2000,"};
    resultSetEqualTest("SELECT min_time(s0) FROM root.fans.d0;", expectedHeader, retArray);

    expectedHeader = new String[] {"max_time(root.fans.d0.s0)"};
    retArray = new String[] {"-2,"};
    resultSetEqualTest(
        "SELECT max_time(s0) FROM root.fans.d0 WHERE time<-1;", expectedHeader, retArray);
  }
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/IoTDBInsertWithQueryIT.java