SignerAsRequestSigner implements RequestSigner { @Override public void sign(SignableRequest<?> request) { signer.sign(request, credentialsProvider.getCredentials()); } SignerAsRequestSigner(Signer signer, AWSCredentialsProvider credentialsProvider); @Override void sign(SignableRequest<?> request);  }
@Test public void callsDownToUnderlyingSignerWithCredentialsFromCredentialProvider() { when(credentialsProvider.getCredentials()).thenReturn(credentials); sut.sign(request); verify(signer).sign(request, credentials); }