services/sts/src/it/java/software/amazon/awssdk/services/sts/AssumeRoleIntegrationTest.java [208:234]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            helper.remove("AWS_SESSION_TOKEN");

            String ASSUME_ROLE_PROFILE =
                "[test]\n"
                + "region = us-west-1\n"
                + "credential_source = Environment\n"
                + "role_arn = " + ROLE_ARN;

            ProfileFile profiles = ProfileFile.builder()
                                              .content(new StringInputStream(ASSUME_ROLE_PROFILE))
                                              .type(ProfileFile.Type.CREDENTIALS)
                                              .build();
            Optional<Profile> profile = profiles.profile("test");
            AwsCredentialsProvider awsCredentialsProvider =
                new ProfileCredentialsUtils(profiles, profile.get(), profiles::profile).credentialsProvider().get();


            // Try to assume the role until the eventual consistency catches up.
            AwsCredentials awsCredentials = Waiter.run(awsCredentialsProvider::resolveCredentials)
                                                  .ignoringException(StsException.class)
                                                  .orFail();

            assertThat(awsCredentials.accessKeyId()).isNotBlank();
            assertThat(awsCredentials.secretAccessKey()).isNotBlank();
            assertThat(awsCredentials.accountId()).isPresent();
            ((SdkAutoCloseable) awsCredentialsProvider).close();
        });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



services/sts/src/it/java/software/amazon/awssdk/services/sts/AssumeRoleIntegrationTest.java [246:272]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                helper.remove("AWS_SESSION_TOKEN");

                String ASSUME_ROLE_PROFILE =
                    "[test]\n"
                    + "region = us-west-1\n"
                    + "credential_source = Environment\n"
                    + "role_arn = " + ROLE_ARN;

                ProfileFile profiles = ProfileFile.builder()
                                                  .content(new StringInputStream(ASSUME_ROLE_PROFILE))
                                                  .type(ProfileFile.Type.CREDENTIALS)
                                                  .build();
                Optional<Profile> profile = profiles.profile("test");
                AwsCredentialsProvider awsCredentialsProvider =
                    new ProfileCredentialsUtils(profiles, profile.get(), profiles::profile).credentialsProvider().get();


                // Try to assume the role until the eventual consistency catches up.
                AwsCredentials awsCredentials = Waiter.run(awsCredentialsProvider::resolveCredentials)
                                                      .ignoringException(StsException.class)
                                                      .orFail();

                assertThat(awsCredentials.accessKeyId()).isNotBlank();
                assertThat(awsCredentials.secretAccessKey()).isNotBlank();
                assertThat(awsCredentials.accountId()).isPresent();
                ((SdkAutoCloseable) awsCredentialsProvider).close();
            });
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



