public static <V> Read<V> read() {
    return new AutoValue_SparkReceiverIO_Read.Builder<V>().build();
  }
@Test
  public void testReadBuildsCorrectly() {
    ReceiverBuilder<String, CustomReceiverWithOffset> receiverBuilder =
        new ReceiverBuilder<>(CustomReceiverWithOffset.class).withConstructorArgs();
    SerializableFunction<String, Long> offsetFn = Long::valueOf;
    SerializableFunction<String, Instant> timestampFn = Instant::parse;

    SparkReceiverIO.Read<String> read =
        SparkReceiverIO.<String>read()
            .withGetOffsetFn(offsetFn)
            .withTimestampFn(timestampFn)
            .withPullFrequencySec(PULL_FREQUENCY_SEC)
            .withStartPollTimeoutSec(START_POLL_TIMEOUT_SEC)
            .withStartOffset(START_OFFSET)
            .withSparkReceiverBuilder(receiverBuilder);

    assertEquals(offsetFn, read.getGetOffsetFn());
    assertEquals(receiverBuilder, read.getSparkReceiverBuilder());
  }