question: public void testGetColumnType ( ) { int [ ] types = { Types . SMALLINT , Types . VARCHAR , Types . VARCHAR } ; try { for ( int i = 0 ; i < rsmd . getColumnCount ( ) ; i ++ ) { int type = rsmd . getColumnType ( i + 1 ) ; assertEquals ( types [ i ] , type ) ; } } catch ( SQLException e ) { fail ( "SQLException is thrown: " + e . getMessage ( ) ) ; } try { rsmd . getColumnType ( 0 ) ; fail ( "SQLException is not thrown" ) ; } catch ( SQLException e ) { } try { rsmd . getColumnType ( 5 ) ; fail ( "SQLException is not thrown" ) ; } catch ( SQLException e ) { } }
target:  For extensive tests see: ResultSetGetterTest.testGetMetaData