public static ReadRows readRows() {
    return new AutoValue_JdbcIO_ReadRows.Builder()
        .setFetchSize(DEFAULT_FETCH_SIZE)
        .setOutputParallelization(true)
        .setStatementPreparator(ignored -> {})
        .build();
  }
@Test
  @SuppressWarnings({"UnusedVariable", "AssertThrowsMultipleStatements"})
  public void testReadRowsFailedToGetSchema() {
    Exception exc =
        assertThrows(
            BeamSchemaInferenceException.class,
            () -> {
              // Using a new pipeline object to avoid the various checks made by TestPipeline in
              // this pipeline which is
              // expected to throw an exception.
              Pipeline pipeline = Pipeline.create();
              pipeline.apply(
                  JdbcIO.readRows()
                      .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
                      .withQuery(
                          String.format(
                              "SELECT CAST(1 AS NUMERIC(1, 0)) AS T1 FROM %s", "unknown_table")));
              pipeline.run();
            });

    assertThat(exc.getMessage(), containsString("Failed to infer Beam schema"));
  }