private void testBug71396PrepStatementCheck(PreparedStatement testPStmt,String query,int expRowCount) throws SQLException {
  ResultSet testRS;
  testRS=testPStmt.executeQuery();
  assertTrue(testRS.last());
  assertEquals(String.format("Wrong number of rows for query '%s'",query),expRowCount,testRS.getRow());
  testRS.close();
  testPStmt.execute();
  testRS=testPStmt.getResultSet();
  assertTrue(testRS.last());
  assertEquals(String.format("Wrong number of rows for query '%s'",query),expRowCount,testRS.getRow());
  testRS.close();
}

private void testBug71396PrepStatementCheck ( PreparedStatement testPStmt , String query , int expRowCount ) throws SQLException { ResultSet testRS ; testRS = testPStmt . executeQuery ( ) ; assertTrue ( testRS . last ( ) ) ; assertEquals ( String . format ( "Wrong number of rows for query '%s'" , query ) , expRowCount , testRS . getRow ( ) ) ; testRS . close ( ) ; testPStmt . execute ( ) ; testRS = testPStmt . getResultSet ( ) ; assertTrue ( testRS . last ( ) ) ; assertEquals ( String . format ( "Wrong number of rows for query '%s'" , query ) , expRowCount , testRS . getRow ( ) ) ; testRS . close ( ) ; }
executes one query using a preparedstatement and tests if the results count is the expected .
