@Test
public void testToStringThrowsWhenDatasetIsNull() {

  TableReference tableRef = new TableReference()
      .setProjectId("foo-proj")
      .setDatasetId(null)
      .setTableId("tableId");
  assertThrows(IllegalArgumentException.class, () -> BigQueryStrings.toString(tableRef));
}