@Test
    public void getCredentials_failsIfImdsFailsOnFirstCall() {
        mockServer.stop();
        try {
            new InstanceProfileCredentialsProvider().getCredentials();
        } catch (SdkClientException e) {
            // Expected
        }
    }
Tests by initiating a refresh thread in parallel which refreshes the
credentials. Next call to credentials provider will result in refreshing
and getting new credentials.
aws-java-sdk-core/src/test/java/com/amazonaws/auth/InstanceProfileCredentialsProviderIntegrationTest.java