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