PagedCallSettings extends UnaryCallSettings<RequestT, ResponseT> { public static <RequestT, ResponseT, PagedListResponseT> Builder<RequestT, ResponseT, PagedListResponseT> newBuilder( PagedListResponseFactory<RequestT, ResponseT, PagedListResponseT> pagedListResponseFactory) { return new Builder<>(pagedListResponseFactory); } private  PagedCallSettings(Builder<RequestT, ResponseT, PagedListResponseT> builder); PagedListResponseFactory<RequestT, ResponseT, PagedListResponseT> getPagedListResponseFactory(); static Builder<RequestT, ResponseT, PagedListResponseT> newBuilder(
          PagedListResponseFactory<RequestT, ResponseT, PagedListResponseT>
              pagedListResponseFactory); @Override final Builder<RequestT, ResponseT, PagedListResponseT> toBuilder();  }
@Test public void testBuilder() { @SuppressWarnings("unchecked") PagedListResponseFactory<Integer, String, Long> pagedListResponseFactory = Mockito.mock(PagedListResponseFactory.class); PagedCallSettings.Builder<Integer, String, Long> builder = PagedCallSettings.newBuilder(pagedListResponseFactory); Set<StatusCode.Code> retryCodes = Sets.newHashSet(Code.UNAVAILABLE); RetrySettings retrySettings = RetrySettings.newBuilder() .setInitialRetryDelay(Duration.ofMillis(5)) .setMaxRetryDelay(Duration.ofSeconds(1)) .setRetryDelayMultiplier(2) .setInitialRpcTimeout(Duration.ofMillis(100)) .setMaxRpcTimeout(Duration.ofMillis(200)) .setRpcTimeoutMultiplier(1.1) .setJittered(true) .setMaxAttempts(10) .build(); builder.setRetryableCodes(retryCodes); builder.setRetrySettings(retrySettings); Truth.assertThat(builder.getRetryableCodes().size()).isEqualTo(1); Truth.assertThat(builder.getRetrySettings()).isEqualTo(retrySettings); PagedCallSettings settings = builder.build(); Truth.assertThat(settings.getRetryableCodes().size()).isEqualTo(1); Truth.assertThat(settings.getRetrySettings()).isEqualTo(retrySettings); }