@Test
  public void testHplSqlProcedureWithUnix_TimestampUdf() throws Throwable {
    String SCRIPT_TEXT =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_millis int);\n" +
            "CREATE PROCEDURE p1()\n" +
            "BEGIN\n" +
            "INSERT INTO result VALUES(UNIX_TIMESTAMP());\n" +
            "END;\n" +
            "p1();\n" +
            "SELECT * FROM result;" ;
    testScriptFile(SCRIPT_TEXT, args(), String.valueOf(System.currentTimeMillis()/100000));
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java