@Test
public void canParseValidIdentifiers() {

    assertThat(TableIdParser.parse("s.a")).containsExactly("s", "a");
    assertThat(TableIdParser.parse("s2.a")).containsExactly("s2", "a");
    assertThat(TableIdParser.parse("table")).containsExactly("table");
    assertThat(TableIdParser.parse("  table  ")).containsExactly("table");
    assertThat(TableIdParser.parse("schema.table")).containsExactly("schema", "table");
    assertThat(TableIdParser.parse("  schema  .  table  ")).containsExactly("schema", "table");
    assertThat(TableIdParser.parse("catalog.schema.table")).containsExactly("catalog", "schema", "table");
    assertThat(TableIdParser.parse("catalog  .  schema  .  table")).containsExactly("catalog", "schema", "table");
    assertThat(TableIdParser.parse("\"table\"")).containsExactly("table");
    assertThat(TableIdParser.parse("\"ta.ble\"")).containsExactly("ta.ble");
    assertThat(TableIdParser.parse("\"ta   ble\"")).containsExactly("ta   ble");
    assertThat(TableIdParser.parse("\"schema\".\"table\"")).containsExactly("schema", "table");
    assertThat(TableIdParser.parse("\"cata . log\" . \"sche . ma\" . \"ta . ble\"")).containsExactly("cata . log", "sche . ma", "ta . ble");
    assertThat(TableIdParser.parse("\"tab\"\"le\"")).containsExactly("tab\"le");
    assertThat(TableIdParser.parse("\"tab\"\"\"\"le\"")).containsExactly("tab\"\"le");
    assertThat(TableIdParser.parse("\"\"\"s\"\"\".\"\"\"a\"\"\"")).containsExactly("\"s\"", "\"a\"");
}