public static <T, PartitionColumnT> ReadWithPartitions<T, PartitionColumnT> readWithPartitions(
      TypeDescriptor<PartitionColumnT> partitioningColumnType) {
    return new AutoValue_JdbcIO_ReadWithPartitions.Builder<T, PartitionColumnT>()
        .setPartitionColumnType(partitioningColumnType)
        .setNumPartitions(DEFAULT_NUM_PARTITIONS)
        .setFetchSize(DEFAULT_FETCH_SIZE)
        .setUseBeamSchema(false)
        .build();
  }
@Test
  public void testIfNumPartitionsIsZero() {
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage("numPartitions can not be less than 1");
    pipeline.apply(
        JdbcIO.<TestRow>readWithPartitions()
            .withDataSourceConfiguration(DATA_SOURCE_CONFIGURATION)
            .withRowMapper(new JdbcTestHelper.CreateTestRowOfNameAndId())
            .withTable(READ_TABLE_NAME)
            .withNumPartitions(0)
            .withPartitionColumn("id")
            .withLowerBound(0L)
            .withUpperBound(1000L));
    pipeline.run();
  }