@Test
  public void testPostClose() throws SQLException {
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery("select * from " + tableName);
    assertNotNull("ResultSet is null", res);
    res.close();
    try { res.getInt(1); fail("Expected SQLException"); }
    catch (SQLException e) { }
    try { res.getMetaData(); fail("Expected SQLException"); }
    catch (SQLException e) { }
    try { res.setFetchSize(10); fail("Expected SQLException"); }
    catch (SQLException e) { }
  }
Validate error on closed resultset
@throws SQLException
itests/hive-unit/src/test/java/org/apache/hive/jdbc/cbo_rp_TestJdbcDriver2.java