@Test public void testNeedsToLoadCredentialsMethod() throws Exception { TestCredentialsProvider credentialsProvider = new TestCredentialsProvider(); stubForSuccessResonseWithCustomExpirationDate(200, DateUtils.formatISO8601Date(new Date(System.currentTimeMillis() + ONE_MINUTE * 60 * 24)).toString()); credentialsProvider.getCredentials(); assertFalse(credentialsProvider.needsToLoadCredentials()); stubForSuccessResonseWithCustomExpirationDate(200, DateUtils.formatISO8601Date(new Date(System.currentTimeMillis() + ONE_MINUTE * 16)).toString()); credentialsProvider.getCredentials(); credentialsProvider.setLastInstanceProfileCheck(new Date(System.currentTimeMillis() - ONE_MINUTE * 61)); assertTrue(credentialsProvider.needsToLoadCredentials()); stubForSuccessResonseWithCustomExpirationDate(200, DateUtils.formatISO8601Date(new Date(System.currentTimeMillis() + ONE_MINUTE * 14)).toString()); credentialsProvider.getCredentials(); assertTrue(credentialsProvider.needsToLoadCredentials()); }
@Override public String toString() { return "ContainerCredentialsFetcher"; }
ContainerCredentialsFetcher extends BaseCredentialsFetcher { @Override public String toString() { return "ContainerCredentialsFetcher"; } }
ContainerCredentialsFetcher extends BaseCredentialsFetcher { @Override public String toString() { return "ContainerCredentialsFetcher"; } ContainerCredentialsFetcher(CredentialsEndpointProvider credentialsEndpointProvider); }
ContainerCredentialsFetcher extends BaseCredentialsFetcher { @Override public String toString() { return "ContainerCredentialsFetcher"; } ContainerCredentialsFetcher(CredentialsEndpointProvider credentialsEndpointProvider); @Override String toString(); }
ContainerCredentialsFetcher extends BaseCredentialsFetcher { @Override public String toString() { return "ContainerCredentialsFetcher"; } ContainerCredentialsFetcher(CredentialsEndpointProvider credentialsEndpointProvider); @Override String toString();  }