JcrResultSetMetaData implements ResultSetMetaData { @Override public String getColumnName( int column ) throws SQLException { return getColumnLabel(column); } protected  JcrResultSetMetaData( JcrConnection connection,
                                    QueryResult results ); @Override String getCatalogName( int column ); @Override String getColumnClassName( int column ); @Override int getColumnCount(); @Override int getColumnDisplaySize( int column ); @Override String getColumnLabel( int column ); @Override String getColumnName( int column ); @Override int getColumnType( int column ); @Override String getColumnTypeName( int column ); @Override int getPrecision( int column ); @Override int getScale( int column ); @Override String getSchemaName( int column ); @Override String getTableName( int column ); @Override boolean isAutoIncrement( int column ); @Override boolean isCaseSensitive( int column ); @Override boolean isCurrency( int column ); @Override boolean isDefinitelyWritable( int column ); @Override int isNullable( int column ); @Override boolean isReadOnly( int column ); @Override boolean isSearchable( int column ); @Override boolean isSigned( int column ); @Override boolean isWritable( int column ); @Override boolean isWrapperFor( Class<?> iface ); @Override T unwrap( Class<T> iface );  }
@Test public void shouldReturnColumnNameFromQueryResultColumNames() throws SQLException { for (int i = 0; i != columnNames.length; ++i) { assertThat(metadata.getColumnName(i + 1), is(columnNames[i])); } }