public void testGetStatement() throws SQLException {
  DatabaseMetaData meta=conn.getMetaData();
  ResultSet info=meta.getTypeInfo();
  Statement statement2=info.getStatement();
  assertNull(statement2);
  statement2=res.getStatement();
  assertEquals(st,statement2);
  try {
    res.close();
    res.getStatement();
    fail("Exception expected");
  }
 catch (  SQLException e) {
  }
}

public void testGetStatement ( ) throws SQLException { DatabaseMetaData meta = conn . getMetaData ( ) ; ResultSet info = meta . getTypeInfo ( ) ; Statement statement2 = info . getStatement ( ) ; assertNull ( statement2 ) ; statement2 = res . getStatement ( ) ; assertEquals ( st , statement2 ) ; try { res . close ( ) ; res . getStatement ( ) ; fail ( "Exception expected" ) ; } catch ( SQLException e ) { } }
according to spec info . getstatement should return null but an exception is thrown : stale result set .
