public static TableIdentifier fromJson(String json) {
    Preconditions.checkArgument(
        json != null, "Cannot parse table identifier from invalid JSON: null");
    Preconditions.checkArgument(
        !json.isEmpty(), "Cannot parse table identifier from invalid JSON: ''");
    return JsonUtil.parse(json, TableIdentifierParser::fromJson);
  }
@Test
  public void testFailWhenFieldsHaveInvalidValues() {
    String invalidNamespace = "{\"namespace\":\"accounting.tax\",\"name\":\"paid\"}";
    assertThatThrownBy(() -> TableIdentifierParser.fromJson(invalidNamespace))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse JSON array from non-array value: namespace: \"accounting.tax\"");

    String invalidName = "{\"namespace\":[\"accounting\",\"tax\"],\"name\":1234}";
    assertThatThrownBy(() -> TableIdentifierParser.fromJson(invalidName))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse to a string value: name: 1234");
  }