@Test
    public void shouldPassSigv4ToServer() throws Exception {
        final AwsCredentialsProvider credentialsProvider = mock(AwsCredentialsProvider.class);
        final AwsSessionCredentials credentials = AwsSessionCredentials.create("I am AWSAccessKeyId", "I am AWSSecretKey", "I am AWSSessionToken");
        when(credentialsProvider.resolveCredentials()).thenReturn(credentials);

        final AtomicReference<HttpRequest> httpRequest = new AtomicReference<>();
        final Cluster cluster = TestClientFactory.build()
                .auth(sigv4("us-west2", credentialsProvider, "service-name"))
                .addInterceptor("header-checker", r -> {
                    httpRequest.set(r);
                    return r;
                })
                .create();
        final Client client = cluster.connect();
        client.submit("g.inject(2)").all().get();

        Map<String, String> headers = httpRequest.get().headers();
        assertNotNull(headers.get("X-Amz-Date"));
        assertThat(headers.get("Authorization"), startsWith("AWS4-HMAC-SHA256 Credential=I am AWSAccessKeyId"));
        assertThat(headers.get("Authorization"),
                allOf(containsString("/us-west2/service-name/aws4_request"), containsString("Signature=")));

        cluster.close();
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java