@Test
    public void readResourceReturnsAceFor404ErrorResponse() throws Exception {
        try {
            ec2ResourceFetcher.readResource(new URI("http://localhost:" + mockServer.port() + "/dummyPath"));
            fail("Expected AmazonClientException");
        } catch (AmazonClientException ace) {
            assertTrue(ace.getMessage().contains("The requested metadata is not found at"));
        }
    }
When server returns with 404 status code,
the test should throw AmazonClientException.
aws-java-sdk-core/src/test/java/com/amazonaws/internal/EC2ResourceFetcherTest.java