@Test
public void testGetSchemaFromStringRecordTypeLacksFields() {

  // Missing 'fields' entry for an entry of type "RECORD".
  String fields =
      "[{'name': 'MyName', 'type': 'STRING'},"
      + "{'name': 'MyNestedField', 'type': 'RECORD', 'mode': 'repeated'}]";
  assertThrows(IllegalArgumentException.class, () -> BigQueryUtils.getSchemaFromString(fields));
}