@After
    public void tearDown() throws Exception {
        mockServer.stop();
        Thread.sleep(1000);
    }
Shuts down the mock EC2 Instance Metadata Service.
aws-java-sdk-core/src/test/java/com/amazonaws/auth/InstanceProfileCredentialsProviderIntegrationTest.java