private void assertAllFromTbl1(Statement stmt,String[] ones,short[] twos) throws SQLException {
  ResultSet rs=stmt.executeQuery("select * from tbl1");
  int i=0;
  for (; rs.next(); i++) {
    assertTrue(i < ones.length);
    assertEquals(ones[i],rs.getString("one"));
    assertEquals(twos[i],rs.getShort("two"));
  }
  assertTrue(i == ones.length);
}

private void assertAllFromTbl1 ( Statement stmt , String [ ] ones , short [ ] twos ) throws SQLException { ResultSet rs = stmt . executeQuery ( "select * from tbl1" ) ; int i = 0 ; for ( ; rs . next ( ) ; i ++ ) { assertTrue ( i < ones . length ) ; assertEquals ( ones [ i ] , rs . getString ( "one" ) ) ; assertEquals ( twos [ i ] , rs . getShort ( "two" ) ) ; } assertTrue ( i == ones . length ) ; }
asserts that the expected values can be selected from the test table .
