@Test public void base_credentials_returned_when_no_request_credentials_is_present() { final String awsAccessKeyId = "foo"; final String awsSecretAccessKey = "bar"; final StaticCredentialsProvider base = new StaticCredentialsProvider (new BasicAWSCredentials(awsAccessKeyId, awsSecretAccessKey)); AWSCredentialsProvider actual = CredentialUtils .getCredentialsProvider((AmazonWebServiceRequest) null, base); Assert.assertThat(actual, Matchers.instanceOf(StaticCredentialsProvider .class)); assertEquals(awsAccessKeyId, actual.getCredentials().getAWSAccessKeyId()); assertEquals(awsSecretAccessKey, actual.getCredentials().getAWSSecretKey()); }
public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; }
CredentialUtils { public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; } }
CredentialUtils { public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; }  }
CredentialUtils { public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; }  static AWSCredentialsProvider getCredentialsProvider(
            AmazonWebServiceRequest req,
            AWSCredentialsProvider base); static AWSCredentialsProvider getCredentialsProvider(
            RequestConfig requestConfig,
            AWSCredentialsProvider base); }
CredentialUtils { public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; }  static AWSCredentialsProvider getCredentialsProvider(
            AmazonWebServiceRequest req,
            AWSCredentialsProvider base); static AWSCredentialsProvider getCredentialsProvider(
            RequestConfig requestConfig,
            AWSCredentialsProvider base);  }