@Test
  public void testPrepareSetDate() throws Exception {
    try {
      String sql = "select * from " + dataTypeTableName + " where c20 = ?";
      PreparedStatement ps = con.prepareStatement(sql);
      java.sql.Date dtValue = java.sql.Date.valueOf("2013-01-01");
      ps.setDate(1, dtValue);
      ResultSet res = ps.executeQuery();
      assertTrue(res.next());
      assertEquals("2013-01-01", res.getString(20));
      ps.close();
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.toString());
    }
  }
Test getting query log when HS2 disable logging.

@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/cbo_rp_TestJdbcDriver2.java