AWSStaticCredentialsProvider implements AWSCredentialsProvider { public AWSCredentials getCredentials() { return credentials; } AWSStaticCredentialsProvider(AWSCredentials credentials); AWSCredentials getCredentials(); void refresh();  }
@Test public void getBasicAwsCredentials_ReturnsSameCredentials() throws Exception { final BasicAWSCredentials credentials = new BasicAWSCredentials("akid", "skid"); final AWSCredentials actualCredentials = new AWSStaticCredentialsProvider(credentials).getCredentials(); assertEquals(credentials, actualCredentials); }
@Test public void getSessionAwsCredentials_ReturnsSameCredentials() throws Exception { final BasicSessionCredentials credentials = new BasicSessionCredentials("akid", "skid", "token"); final AWSCredentials actualCredentials = new AWSStaticCredentialsProvider(credentials).getCredentials(); assertEquals(credentials, actualCredentials); }