@Test public void whenNoInstanceProfileCredentialsInMetadataServiceReturnNull() throws Exception { server.enqueue(new MockResponse().setBody("")); assertThat(new ReadFirstInstanceProfileCredentialsOrNull(server.getUrl( InstanceMetadataHook.DEFAULT_URI.getPath()).toURI()).get()).isNull(); assertThat(server.takeRequest()).hasPath("/latest/meta-data/iam/security-credentials/"); }
@Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); @Override String toString(); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); @Override String toString();  }