use of software.amazon.awssdk.core.RequestOverrideConfiguration in project aws-sdk-java-v2 by aws.
the class ApplyUserAgentInterceptorTest method ddbRequest_shouldModifyRequest.
@Test
public void ddbRequest_shouldModifyRequest() {
GetItemRequest getItemRequest = GetItemRequest.builder().build();
SdkRequest sdkRequest = interceptor.modifyRequest(() -> getItemRequest, new ExecutionAttributes());
RequestOverrideConfiguration requestOverrideConfiguration = sdkRequest.overrideConfiguration().get();
assertThat(requestOverrideConfiguration.apiNames().stream().filter(a -> a.name().equals("hll") && a.version().equals("ddb-enh")).findAny()).isPresent();
}
use of software.amazon.awssdk.core.RequestOverrideConfiguration in project aws-sdk-java-v2 by aws.
the class ApplyUserAgentInterceptorTest method s3Request_shouldModifyRequest.
@Test
void s3Request_shouldModifyRequest() {
GetObjectRequest getItemRequest = GetObjectRequest.builder().build();
SdkRequest sdkRequest = interceptor.modifyRequest(() -> getItemRequest, new ExecutionAttributes());
RequestOverrideConfiguration requestOverrideConfiguration = sdkRequest.overrideConfiguration().get();
assertThat(requestOverrideConfiguration.apiNames().stream().anyMatch(a -> a.name().equals("ft") && a.version().equals("s3-transfer"))).isTrue();
}
Aggregations