@Test
  public void testACTIVITY_COUNTHplSqlFunction1() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
        "CREATE TABLE result (col1 string);\n" +
        "INSERT INTO result VALUES('Alice');\n" +
        "INSERT INTO result VALUES('Bob');\n" +
        "SELECT * FROM result;\n" +
        "SELECT ACTIVITY_COUNT;";
    testScriptFile(scriptText, args(), "2");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java