AwsCliConfigFile { public AWSCredentialsProvider getCredentialsProvider(String profile) { AwsCliProfile p = profilesByName.get(profile); if (p == null) { throw new IllegalArgumentException("No AWS profile named '" + profile + "'"); } return p.getAwsCredentialsProvider(); } AwsCliConfigFile();  AwsCliConfigFile(String filePath);  AwsCliConfigFile(File file); AWSCredentialsProvider getCredentialsProvider(String profile); void refresh(); Map<String, AwsCliProfile> getAllProfiles(); static final String AWSCLI_CONFIG_ENVIRONMENT_VARIABLE; static final String AWSCLI_CONFIG_SYSTEM_PROPERTY; static final String DEFAULT_PROFILE_NAME; }
@Test public void testSrcProfiles() { AWSCredentialsProvider actual = sut.getCredentialsProvider("src"); assertThat(actual, is(instanceOf(AWSStaticCredentialsProvider.class))); }
@Test public void testTestProfiles() { AWSCredentialsProvider actual = sut.getCredentialsProvider("test"); assertThat(actual, is(instanceOf(STSAssumeRoleSessionCredentialsProvider.class))); }