AuthenticationInfoAWSCredentials implements AWSCredentials { @Override public String getAWSSecretKey() { return this.authenticationInfo.getPassword(); } AuthenticationInfoAWSCredentials(AuthenticationInfo authenticationInfo); @Override String getAWSAccessKeyId(); @Override String getAWSSecretKey();  }
@Test public void getAWSSecretKey() { when(this.authenticationInfo.getPassword()).thenReturn("foo"); assertEquals("foo", this.awsCredentials.getAWSSecretKey()); }