@Test
  public void testNullResultSet() throws Exception {
    List<String> setupQueries = new ArrayList<String>();
    String testQuery;
    Statement stmt = con.createStatement();

    // -select- should return a ResultSet
    testQuery = "select * from " + tableName + " limit 5";
    checkResultSetExpected(stmt, setupQueries, testQuery, true);
    setupQueries.clear();

    // -create- should not return a ResultSet
    setupQueries.add("drop table test_t1");
    testQuery = "create table test_t1 (under_col int, value string)";
    checkResultSetExpected(stmt, setupQueries, testQuery, false);
    setupQueries.clear();

    // -create table as select- should not return a ResultSet
    setupQueries.add("drop table test_t1");
    testQuery = "create table test_t1 as select * from " + tableName + " limit 5";
    checkResultSetExpected(stmt, setupQueries, testQuery, false);
    setupQueries.clear();

    // -insert table as select- should not return a ResultSet
    setupQueries.add("drop table test_t1");
    setupQueries.add("create table test_t1 (under_col int, value string)");
    testQuery = "insert into table test_t1 select under_col, value from "  + tableName + " limit 5";
    checkResultSetExpected(stmt, setupQueries, testQuery, false);
    setupQueries.clear();

    stmt.close();
  }
Execute "set x" and extract value from key=val format result
Verify the extracted value
@param key
@param expectedVal
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java