private void shouldStoreUserAgentInHttpContext() throws InterruptedException {
        if(server.getChannelizer() instanceof TestChannelizer) {
            TestChannelizer channelizer = (TestChannelizer) server.getChannelizer();
            channelizer.resetChannelHandlerContext();
            assertNull(getUserAgentIfAvailable());
            final Cluster cluster = TestClientFactory.build()
                    .enableUserAgentOnConnect(true)
                    .create();
            final Client client = cluster.connect();

            client.submit("g.V()");
            waitForUserAgentAvailability();
            assertEquals(UserAgent.USER_AGENT, getUserAgentIfAvailable());
            client.submit("g.V()");
            waitForUserAgentAvailability();
            assertEquals(UserAgent.USER_AGENT, getUserAgentIfAvailable());
            client.close();
            cluster.close();
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java