question: public static void assertColumnTypes ( ResultSet rs , int [ ] expectedTypes ) throws SQLException { ResultSetMetaData rsmd = rs . getMetaData ( ) ; int actualCols = rsmd . getColumnCount ( ) ; assertEquals ( "Unexpected column count:" , expectedTypes . length , rsmd . getColumnCount ( ) ) ; for ( int i = 0 ; i < actualCols ; i ++ ) { assertEquals ( "Column types do not match for column " + ( i + 1 ) , expectedTypes [ i ] , rsmd . getColumnType ( i + 1 ) ) ; } }
target:  Test Method from Apache Derby Project Class org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest Takes a result set and an array of expected column types from java.sql.Types and asserts that the column types in the result set metadata match the number, order, and names of those in the array. No length information for variable length types can be passed. For ResultSets from JDBC DatabaseMetaData the specification only indicates the types of the columns, not the length.