@Test
@FixFor("DBZ-1089")
public void shouldBuildCorrectSchemaNames() {

    // table id with catalog and schema
    schema = new TableSchemaBuilder(new JdbcValueConverters(), adjuster, customConverterRegistry, SchemaBuilder.struct().build(), false)
            .create(prefix, "sometopic", table, null, null, null);
    assertThat(schema).isNotNull();
    assertThat(schema.keySchema().name()).isEqualTo("schema.table.Key");
    assertThat(schema.valueSchema().name()).isEqualTo("schema.table.Value");
    // only catalog
    table = table.edit()
            .tableId(new TableId("testDb", null, "testTable"))
            .create();
    schema = new TableSchemaBuilder(new JdbcValueConverters(), adjuster, customConverterRegistry, SchemaBuilder.struct().build(), false)
            .create(prefix, "sometopic", table, null, null, null);
    assertThat(schema).isNotNull();
    assertThat(schema.keySchema().name()).isEqualTo("testDb.testTable.Key");
    assertThat(schema.valueSchema().name()).isEqualTo("testDb.testTable.Value");
    // only schema
    table = table.edit()
            .tableId(new TableId(null, "testSchema", "testTable"))
            .create();
    schema = new TableSchemaBuilder(new JdbcValueConverters(), adjuster, customConverterRegistry, SchemaBuilder.struct().build(), false)
            .create(prefix, "sometopic", table, null, null, null);
    assertThat(schema).isNotNull();
    assertThat(schema.keySchema().name()).isEqualTo("testSchema.testTable.Key");
    assertThat(schema.valueSchema().name()).isEqualTo("testSchema.testTable.Value");
    // neither catalog nor schema
    table = table.edit()
            .tableId(new TableId(null, null, "testTable"))
            .create();
    schema = new TableSchemaBuilder(new JdbcValueConverters(), adjuster, customConverterRegistry, SchemaBuilder.struct().build(), false)
            .create(prefix, "sometopic", table, null, null, null);
    assertThat(schema).isNotNull();
    assertThat(schema.keySchema().name()).isEqualTo("testTable.Key");
    assertThat(schema.valueSchema().name()).isEqualTo("testTable.Value");
}