@Test
public void testTableReferenceToStringWithNoProjectId() {

  TableReference tableRef = new TableReference()
      .setDatasetId("foo")
      .setTableId("bar");
  assertThat(BigQueryStrings.toString(tableRef)).isEqualTo("foo.bar");
  // Empty string doesn't cause a leading ':'.
  tableRef.setProjectId("");
  assertThat(BigQueryStrings.toString(tableRef)).isEqualTo("foo.bar");
}