@Test
    public void testSessionCredentialsNoAccountId() throws Exception {
        mockServer.setResponseContent(nonExpiredResponse());
        mockServer.setAvailableSecurityCredentials("aws-dr-tools-test");

        InstanceProfileCredentialsProvider credentialsProvider = new InstanceProfileCredentialsProvider();
        BasicSessionCredentials credentials = (BasicSessionCredentials) credentialsProvider.getCredentials();

        assertNull(credentials.getAccountId());
    }
Tests that we correctly handle the metadata service returning credentials with no account ID.
aws-java-sdk-core/src/test/java/com/amazonaws/auth/InstanceProfileCredentialsProviderIntegrationTest.java