AmazonWebServiceRequestAdapter extends RequestConfig { @Override public RequestClientOptions getRequestClientOptions() { return request.getRequestClientOptions(); } AmazonWebServiceRequestAdapter(AmazonWebServiceRequest request); @Override ProgressListener getProgressListener(); @Override RequestMetricCollector getRequestMetricsCollector(); @Override AWSCredentialsProvider getCredentialsProvider(); @Override Map<String, String> getCustomRequestHeaders(); @Override Map<String, List<String>> getCustomQueryParameters(); @Override Integer getRequestTimeout(); @Override Integer getClientExecutionTimeout(); @Override RequestClientOptions getRequestClientOptions(); @Override String getRequestType(); @Override Object getOriginalRequest();  }
@Test public void readLimitMutatedOnClientOptions_IsReflectedInAdaptedClientOptions() { EmptyAmazonWebServiceRequest request = new EmptyAmazonWebServiceRequest(); request.getRequestClientOptions().setReadLimit(9001); AmazonWebServiceRequestAdapter adapter = new AmazonWebServiceRequestAdapter(request); assertEquals(9001, adapter.getRequestClientOptions().getReadLimit()); }
@Test public void userAgentAppendedToClientOptions_IsReflectedInAdaptedClientOptions() { EmptyAmazonWebServiceRequest request = new EmptyAmazonWebServiceRequest(); request.getRequestClientOptions().appendUserAgent("foo-agent"); AmazonWebServiceRequestAdapter adapter = new AmazonWebServiceRequestAdapter(request); assertThat(adapter.getRequestClientOptions().getClientMarker( RequestClientOptions.Marker.USER_AGENT), containsString("foo-agent")); }