### Question:
SpannerRowMetadata implements RowMetadata { @Override public Collection<String> getColumnNames() { return this.columnNames; } SpannerRowMetadata(ResultSetMetadata resultSetMetadata); @Override ColumnMetadata getColumnMetadata(int index); @Override ColumnMetadata getColumnMetadata(String identifier); @Override Iterable<? extends ColumnMetadata> getColumnMetadatas(); @Override Collection<String> getColumnNames();  }### Answer:
@Test public void getColumnNamesReturnsCorrectNamesWhenColumnsPresent() { ResultSetMetadata resultSetMetadata = buildResultSetMetadata(TypeCode.INT64, TypeCode.STRING, TypeCode.BOOL); SpannerRowMetadata metadata = new SpannerRowMetadata(resultSetMetadata); assertThat(metadata.getColumnNames()).containsExactly("column_0", "column_1", "column_2"); }
@Test public void getColumnNamesReturnsEmptyCollectionWhenNoColumns() { SpannerRowMetadata metadata = new SpannerRowMetadata(ResultSetMetadata.getDefaultInstance()); assertThat(metadata.getColumnNames()).isEmpty(); }