### Question:
AwsSigner4Request { public URI getUri() { return uri; } AwsSigner4Request(String region, String service, HttpRequest request, Date signingTime); String getRegion(); String getService(); String getSigningDate(); String getSigningDateTime(); String getScope(); String getMethod(); URI getUri(); String getCanonicalHeaders(); String getSignedHeaders();  }### Answer:
@Test public void includesAuthTokenAsAwsSecurityToken() { HttpUriRequest request = newGet("https: request.setHeader("host", request.getURI().getHost()); String awsSecurityToken = "securityToken"; AuthConfig credentials = new AuthConfig.Builder() .username("awsAccessKeyId") .password( "awsSecretAccessKey") .auth(awsSecurityToken) .build(); AwsSigner4 signer = new AwsSigner4("us-east-1", "someService"); signer.sign(request, credentials, new Date()); Assert.assertEquals(request.getFirstHeader("X-Amz-Security-Token").getValue(), awsSecurityToken); }
@Test public void includesAuthTokenAsAwsSecurityToken() { HttpUriRequest request = newGet("https: request.setHeader("host", request.getURI().getHost()); String awsSecurityToken = "securityToken"; RegistryAuth credentials = new RegistryAuth.Builder() .username("awsAccessKeyId") .password( "awsSecretAccessKey") .auth(awsSecurityToken) .build(); AwsSigner4 signer = new AwsSigner4("us-east-1", "someService"); signer.sign(request, credentials, new Date()); Assert.assertEquals(request.getFirstHeader("X-Amz-Security-Token").getValue(), awsSecurityToken); }