@Test
public void shouldReturnRepositoryNameAsCatalogName() {

    for (int i = 0; i != columnNames.length; ++i) {
        assertThat(metadata.getCatalogName(i), is(info.getRepositoryName()));
    }
    when(info.getRepositoryName()).thenReturn(null);
    for (int i = 0; i != columnNames.length; ++i) {
        assertThat(metadata.getCatalogName(i), is(info.getRepositoryName()));
    }
}