@Test
  public void testUnsupportedFetchTypes() throws Exception {
    try {
      con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
      fail("createStatement with TYPE_SCROLL_SENSITIVE should fail");
    } catch(SQLException e) {
      assertEquals("HYC00", e.getSQLState().trim());
    }

    try {
      con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
          ResultSet.CONCUR_UPDATABLE);
      fail("createStatement with CONCUR_UPDATABLE should fail");
    } catch(SQLException e) {
      assertEquals("HYC00", e.getSQLState().trim());
    }
  }
Negative Test for cursor repositioning to start of resultset
Verify unsupported JDBC resultset attributes
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/cbo_rp_TestJdbcDriver2.java