question: public static void assertColumnNames ( ResultSet rs , String [ ] expectedColNames ) throws SQLException { ResultSetMetaData rsmd = rs . getMetaData ( ) ; int actualCols = rsmd . getColumnCount ( ) ; for ( int i = 0 ; i < actualCols ; i ++ ) { assertEquals ( "Column names do not match:" , expectedColNames [ i ] , rsmd . getColumnName ( i + 1 ) ) ; } assertEquals ( "Unexpected column count:" , expectedColNames . length , rsmd . getColumnCount ( ) ) ; }
target:  * Test Method from Apache Derby Project Class org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest Takes a result set and an array of expected colum names (as Strings)  and asserts that the column names in the result set metadata match the number, order, and names of those in the array.