@Test(timeout = TEST_TIMEOUT)
    public void clientExecutionTimeoutEnabled_WithShorterSocketTimeout_ThrowsSocketTimeoutException()
            throws IOException {
        httpClient = new AmazonHttpClient(new ClientConfiguration().withClientExecutionTimeout(CLIENT_EXECUTION_TIMEOUT)
                .withSocketTimeout(SHORTER_SOCKET_TIMEOUT).withMaxErrorRetry(0));

        try {
            httpClient.requestExecutionBuilder().request(newGetRequest()).execute();
            fail("Exception expected");
        } catch (AmazonClientException e) {
            assertThat(e.getCause(), instanceOf(SocketTimeoutException.class));
            assertNumberOfTasksTriggered(httpClient.getClientExecutionTimer(), 0);
        }
    }
The client execution timer uses interrupts to abort the client but if another thread
interrupts the current thread for another reason we don't want to squash the
{@link InterruptedException}. We should set the thread's interrupted status and throw the
exception back out (we can't throw the actual {@link InterruptedException} because it's
checked)
aws-java-sdk-core/src/test/java/com/amazonaws/http/timers/client/UnresponsiveServerIntegrationTests.java