@Test public void testKeysCredentialsProvider() throws Throwable { final TestRunner runner = TestRunners.newTestRunner(FetchS3Object.class); final AWSCredentialsProviderControllerService serviceImpl = new AWSCredentialsProviderControllerService(); runner.addControllerService("awsCredentialsProvider", serviceImpl); runner.setProperty(serviceImpl, AbstractAWSProcessor.ACCESS_KEY, "awsAccessKey"); runner.setProperty(serviceImpl, AbstractAWSProcessor.SECRET_KEY, "awsSecretKey"); runner.enableControllerService(serviceImpl); runner.assertValid(serviceImpl); final AWSCredentialsProviderService service = (AWSCredentialsProviderService) runner.getProcessContext() .getControllerServiceLookup().getControllerService("awsCredentialsProvider"); Assert.assertNotNull(service); final AWSCredentialsProvider credentialsProvider = service.getCredentialsProvider(); Assert.assertNotNull(credentialsProvider); assertEquals("credentials provider should be equal", StaticCredentialsProvider.class, credentialsProvider.getClass()); }
@Override public AWSCredentialsProvider getCredentialsProvider() throws ProcessException { return credentialsProvider; }
AWSCredentialsProviderControllerService extends AbstractControllerService implements AWSCredentialsProviderService { @Override public AWSCredentialsProvider getCredentialsProvider() throws ProcessException { return credentialsProvider; } }
AWSCredentialsProviderControllerService extends AbstractControllerService implements AWSCredentialsProviderService { @Override public AWSCredentialsProvider getCredentialsProvider() throws ProcessException { return credentialsProvider; }  }
AWSCredentialsProviderControllerService extends AbstractControllerService implements AWSCredentialsProviderService { @Override public AWSCredentialsProvider getCredentialsProvider() throws ProcessException { return credentialsProvider; }  @Override AWSCredentialsProvider getCredentialsProvider(); @OnEnabled void onConfigured(final ConfigurationContext context); @Override String toString(); }
AWSCredentialsProviderControllerService extends AbstractControllerService implements AWSCredentialsProviderService { @Override public AWSCredentialsProvider getCredentialsProvider() throws ProcessException { return credentialsProvider; }  @Override AWSCredentialsProvider getCredentialsProvider(); @OnEnabled void onConfigured(final ConfigurationContext context); @Override String toString(); static final PropertyDescriptor ASSUME_ROLE_ARN; static final PropertyDescriptor ASSUME_ROLE_NAME; static final PropertyDescriptor MAX_SESSION_TIME; }