@Test(expected = IOException.class)
    public void socketTimeoutThrownFromInputStream_ThrowsIoException() throws Exception {
        HttpResponse response = new HttpResponse(null, null);
        response.setContent(new InputStream() {
            @Override
            public int read() throws IOException {
                throw new SocketTimeoutException("socket timeout");
            }
        });
        responseHandler.handle(response);
    }
This throws a socket timeout exception immediately. When creating an XML event reader,
it may read ahead a few bytes so we have to handle the {@link javax.xml.stream.XMLStreamException} in
two places.
aws-java-sdk-core/src/test/java/com/amazonaws/http/StaxResponseHandlerForBlobDataTest.java