@Override
  protected SchemaTransform from(BigQueryExportReadSchemaTransformConfiguration configuration) {
    return new BigQueryExportSchemaTransform(configuration);
  }
@Test
  public void testQuery() {
    // Previous attempts using FakeBigQueryServices with a Read configuration using a query failed.
    // For now, we test using DisplayData and the toTypedRead method.
    List<Pair<BigQueryExportReadSchemaTransformConfiguration.Builder, TypedRead<TableRow>>> cases =
        Arrays.asList(
            Pair.of(
                BigQueryExportReadSchemaTransformConfiguration.builder().setQuery(QUERY),
                BigQueryIO.readTableRowsWithSchema().fromQuery(QUERY)),
            Pair.of(
                BigQueryExportReadSchemaTransformConfiguration.builder()
                    .setQuery(QUERY)
                    .setQueryLocation(LOCATION),
                BigQueryIO.readTableRowsWithSchema().fromQuery(QUERY).withQueryLocation(LOCATION)),
            Pair.of(
                BigQueryExportReadSchemaTransformConfiguration.builder()
                    .setQuery(QUERY)
                    .setUseStandardSql(true),
                BigQueryIO.readTableRowsWithSchema().fromQuery(QUERY).usingStandardSql()),
            Pair.of(
                BigQueryExportReadSchemaTransformConfiguration.builder()
                    .setQuery(QUERY)
                    .setUseStandardSql(false),
                BigQueryIO.readTableRowsWithSchema().fromQuery(QUERY)));

    for (Pair<BigQueryExportReadSchemaTransformConfiguration.Builder, TypedRead<TableRow>> caze :
        cases) {
      Map<Identifier, Item> want = DisplayData.from(caze.getRight()).asMap();
      BigQueryExportReadSchemaTransformProvider provider =
          new BigQueryExportReadSchemaTransformProvider();
      BigQueryExportReadSchemaTransformConfiguration configuration = caze.getLeft().build();
      BigQueryExportSchemaTransform schemaTransform =
          (BigQueryExportSchemaTransform) provider.from(configuration);
      Map<Identifier, Item> got = DisplayData.from(schemaTransform.toTypedRead()).asMap();
      assertEquals(want, got);
    }
  }