### Question:
AmazonWebServiceClient { protected ExecutionContext createExecutionContext(final AmazonWebServiceRequest req) { final boolean isMetricsEnabled = isRequestMetricsEnabled(req) || isProfilingEnabled(); return new ExecutionContext(requestHandler2s, isMetricsEnabled, this); } protected  AmazonWebServiceClient(
            final ClientConfiguration clientConfiguration); @Deprecated protected  AmazonWebServiceClient(
            final ClientConfiguration clientConfiguration,
            final RequestMetricCollector requestMetricCollector); protected  AmazonWebServiceClient(
            final ClientConfiguration clientConfiguration,
            final HttpClient httpClient); @Deprecated protected  AmazonWebServiceClient(
            final ClientConfiguration clientConfiguration,
            final HttpClient httpClient,
            final RequestMetricCollector requestMetricCollector); void setEndpoint(final String endpoint); String getEndpoint(); String getEndpointPrefix(); @Deprecated @SuppressWarnings("checkstyle:hiddenfield") void setEndpoint(final String endpoint,
                            final String serviceName,
                            final String regionId); @SuppressWarnings("checkstyle:hiddenfield") Signer getSignerByURI(final URI uri); @SuppressWarnings("checkstyle:hiddenfield") void setRegion(final Region region); Regions getRegions(); @Deprecated @SuppressWarnings("checkstyle:hiddenfield") void setConfiguration(final ClientConfiguration clientConfiguration); void shutdown(); @Deprecated void addRequestHandler(final RequestHandler requestHandler); void addRequestHandler(final RequestHandler2 requestHandler2); @Deprecated void removeRequestHandler(final RequestHandler requestHandler); void removeRequestHandler(final RequestHandler2 requestHandler2); void setTimeOffset(final int timeOffset); @SuppressWarnings("checkstyle:hiddenfield") AmazonWebServiceClient withTimeOffset(final int timeOffset); int getTimeOffset(); @Deprecated RequestMetricCollector getRequestMetricsCollector(); String getServiceName(); @SuppressWarnings("checkstyle:hiddenfield") final void setServiceNameIntern(final String serviceName); final String getSignerRegionOverride(); @SuppressWarnings("checkstyle:hiddenfield") final void setSignerRegionOverride(final String signerRegionOverride); static final boolean LOGGING_AWS_REQUEST_METRIC; }### Answer:
@Test public void testCreateExecutionContextWithAmazonWebServiceRequest() { final AmazonWebServiceRequest awsr = new TestRequest(); final AmazonTestClient client = new AmazonTestClient(); final ExecutionContext ec = client.createExecutionContext(awsr); assertEquals(client.requestHandler2s, ec.getRequestHandler2s()); }
@Test public void testCreateExecutionContextWithRequest() { final AmazonWebServiceRequest awsr = new TestRequest(); final Request<String> req = new DefaultRequest<String>(awsr, "test"); final AmazonTestClient client = new AmazonTestClient(); final ExecutionContext ec = client.createExecutionContext(req); assertEquals(client.requestHandler2s, ec.getRequestHandler2s()); }