public static String toJson(TableIdentifier identifier) {
    return toJson(identifier, false);
  }
@Test
  public void testTableIdentifierToJson() {
    String json = "{\"namespace\":[\"accounting\",\"tax\"],\"name\":\"paid\"}";
    TableIdentifier identifier = TableIdentifier.of(Namespace.of("accounting", "tax"), "paid");
    assertThat(TableIdentifierParser.toJson(identifier))
        .as("Should be able to serialize a table identifier with both namespace and name")
        .isEqualTo(json);

    TableIdentifier identifierWithEmptyNamespace = TableIdentifier.of(Namespace.empty(), "paid");
    String jsonWithEmptyNamespace = "{\"namespace\":[],\"name\":\"paid\"}";
    assertThat(TableIdentifierParser.toJson(identifierWithEmptyNamespace))
        .as("Should be able to serialize a table identifier that uses the empty namespace")
        .isEqualTo(jsonWithEmptyNamespace);
  }