AmazonWebServiceRequestAdapter extends RequestConfig { @Override public RequestMetricCollector getRequestMetricsCollector() { return request.getRequestMetricCollector(); } 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 customMetricsCollectorSetInBaseRequest_IsSetOnAdapter() { EmptyAmazonWebServiceRequest request = new EmptyAmazonWebServiceRequest(); RequestMetricCollector metricCollector = mock(RequestMetricCollector.class); request.setRequestMetricCollector(metricCollector); AmazonWebServiceRequestAdapter adapter = new AmazonWebServiceRequestAdapter(request); assertEquals(metricCollector, adapter.getRequestMetricsCollector()); }