### Question:
AssumeRoleCredentialProvider implements AWSCredentialsProvider { @Override public void refresh() { if (this.credentialsProvider == null) { initializeCredentialProvider(); } this.credentialsProvider.refresh(); } AssumeRoleCredentialProvider(Configuration conf); @Override AWSCredentials getCredentials(); @Override void refresh(); static final String ASSUME_ROLE_PROPERTY_NAME; static final String ASSUME_ROLE_SESSION_DURATION_SECONDS_PROPERTY_NAME; }### Answer:
@Test(expected = NullPointerException.class) public void refreshThrowsNullPointerException() { AssumeRoleCredentialProvider provider = new AssumeRoleCredentialProvider(null); provider.refresh(); }
@Test(expected = IllegalArgumentException.class) public void refreshThrowsIllegalArgumentException() { AssumeRoleCredentialProvider provider = new AssumeRoleCredentialProvider(new Configuration()); provider.refresh(); }