@Test
    public void shouldRunInterceptorsInOrder() throws Exception {
        AtomicReference<Object> body = new AtomicReference<>();
        final Cluster cluster = TestClientFactory.build().
                addInterceptor("first", r -> {
                    body.set(r.getBody());
                    r.setBody(null);
                    return r;
                }).
                addInterceptor("second", r -> {
                    r.setBody(body.get());
                    return r;
                }).create();

        try {
            final Client client = cluster.connect();
            assertEquals(2, client.submit("g.inject(2)").all().get().get(0).getInt());
        } finally {
            cluster.close();
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java