@Test
public void testGetSchemaFromStringWithMissingName() {

  // Set bad schema for testing; missing 'name' for the first schema entry.
  String fields =
      "[{'type': 'STRING'},"
      + "{'name': 'Number', 'type': 'INTEGER', 'mode': 'sample'}]";
  assertThrows(IllegalArgumentException.class, () -> BigQueryUtils.getSchemaFromString(fields));
}