GoogleCloudStorageReadOptions { public static Builder builder() { return new AutoValue_GoogleCloudStorageReadOptions.Builder() .setBackoffInitialIntervalMillis(DEFAULT_BACKOFF_INITIAL_INTERVAL_MILLIS) .setBackoffRandomizationFactor(DEFAULT_BACKOFF_RANDOMIZATION_FACTOR) .setBackoffMultiplier(DEFAULT_BACKOFF_MULTIPLIER) .setBackoffMaxIntervalMillis(DEFAULT_BACKOFF_MAX_INTERVAL_MILLIS) .setBackoffMaxElapsedTimeMillis(DEFAULT_BACKOFF_MAX_ELAPSED_TIME_MILLIS) .setFastFailOnNotFound(DEFAULT_FAST_FAIL_ON_NOT_FOUND) .setSupportGzipEncoding(DEFAULT_SUPPORT_GZIP_ENCODING) .setBufferSize(DEFAULT_BUFFER_SIZE) .setInplaceSeekLimit(DEFAULT_INPLACE_SEEK_LIMIT) .setFadvise(DEFAULT_FADVISE) .setMinRangeRequestSize(DEFAULT_MIN_RANGE_REQUEST_SIZE) .setGrpcChecksumsEnabled(GRPC_CHECKSUMS_ENABLED_DEFAULT); }  static Builder builder(); abstract Builder toBuilder(); abstract int getBackoffInitialIntervalMillis(); abstract double getBackoffRandomizationFactor(); abstract double getBackoffMultiplier(); abstract int getBackoffMaxIntervalMillis(); abstract int getBackoffMaxElapsedTimeMillis(); abstract boolean getFastFailOnNotFound(); abstract boolean getSupportGzipEncoding(); abstract int getBufferSize(); abstract long getInplaceSeekLimit(); abstract Fadvise getFadvise(); abstract int getMinRangeRequestSize(); abstract boolean isGrpcChecksumsEnabled(); @Nullable abstract String getGrpcServerAddress(); static final int DEFAULT_BACKOFF_INITIAL_INTERVAL_MILLIS; static final double DEFAULT_BACKOFF_RANDOMIZATION_FACTOR; static final double DEFAULT_BACKOFF_MULTIPLIER; static final int DEFAULT_BACKOFF_MAX_INTERVAL_MILLIS; static final int DEFAULT_BACKOFF_MAX_ELAPSED_TIME_MILLIS; static final boolean DEFAULT_FAST_FAIL_ON_NOT_FOUND; static final boolean DEFAULT_SUPPORT_GZIP_ENCODING; static final int DEFAULT_BUFFER_SIZE; static final long DEFAULT_INPLACE_SEEK_LIMIT; static final Fadvise DEFAULT_FADVISE; static final int DEFAULT_MIN_RANGE_REQUEST_SIZE; static final boolean GRPC_CHECKSUMS_ENABLED_DEFAULT; static final GoogleCloudStorageReadOptions DEFAULT; }
@Test public void build_throwsException_whenInplaceSeekLimitLowerThanZero() { long inplaceSeekLimit = -123; GoogleCloudStorageReadOptions.Builder builder = GoogleCloudStorageReadOptions.builder().setInplaceSeekLimit(inplaceSeekLimit); IllegalStateException e = assertThrows(IllegalStateException.class, builder::build); assertThat(e) .hasMessageThat() .isEqualTo("inplaceSeekLimit must be non-negative! Got " + inplaceSeekLimit); }