AwsClientBuilder { public abstract TypeToBuild build(); protected  AwsClientBuilder(ClientConfigurationFactory clientConfigFactory); @SdkTestInternalApi protected  AwsClientBuilder(ClientConfigurationFactory clientConfigFactory,
                               AwsRegionProvider regionProvider); final AWSCredentialsProvider getCredentials(); final void setCredentials(AWSCredentialsProvider credentialsProvider); final Subclass withCredentials(AWSCredentialsProvider credentialsProvider); final ClientConfiguration getClientConfiguration(); final void setClientConfiguration(ClientConfiguration config); final Subclass withClientConfiguration(ClientConfiguration config); final RequestMetricCollector getMetricsCollector(); final void setMetricsCollector(RequestMetricCollector metrics); final Subclass withMetricsCollector(RequestMetricCollector metrics); final String getRegion(); final void setRegion(String region); final Subclass withRegion(Regions region); final Subclass withRegion(String region); final EndpointConfiguration getEndpoint(); final void setEndpointConfiguration(EndpointConfiguration endpointConfiguration); final Subclass withEndpointConfiguration(EndpointConfiguration endpointConfiguration); final List<RequestHandler2> getRequestHandlers(); final void setRequestHandlers(RequestHandler2... handlers); final Subclass withRequestHandlers(RequestHandler2... handlers); final MonitoringListener getMonitoringListener(); final void setMonitoringListener(MonitoringListener monitoringListener); final Subclass withMonitoringListener(MonitoringListener monitoringListener); CsmConfigurationProvider getClientSideMonitoringConfigurationProvider(); void setClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig); Subclass withClientSideMonitoringConfigurationProvider(
            CsmConfigurationProvider csmConfig); abstract TypeToBuild build();  }
@Test public void credentialsNotExplicitlySet_UsesDefaultCredentialChain() throws Exception { AwsAsyncClientParams params = builderWithRegion().build().getAsyncParams(); assertThat(params.getCredentialsProvider(), instanceOf(DefaultAWSCredentialsProviderChain.class)); }
@Test public void metricCollectorNotExplicitlySet_UsesNullMetricsCollector() throws Exception { assertNull(builderWithRegion().build().getAsyncParams().getRequestMetricCollector()); }
@Test public void defaultClientConfigAndNoExplicitExecutor_UsesDefaultExecutorBasedOnMaxConns() { ExecutorService executor = builderWithRegion().build().getAsyncParams().getExecutor(); assertThat(executor, instanceOf(ThreadPoolExecutor.class)); assertEquals(PredefinedClientConfigurations.defaultConfig().getMaxConnections(), ((ThreadPoolExecutor) executor).getMaximumPoolSize()); }