@Test
    public void should200OnPOSTWithChunkedResponseGraphBinary() throws Exception {
        final String gremlin = "g.inject(0,1,2,3,4,5,6,7,8,9,'ten',11,12,13,14,15,'new chunk')";
        final GraphBinaryMessageSerializerV4 serializer = new GraphBinaryMessageSerializerV4();
        final ByteBuf serializedRequest = serializer.serializeRequestAsBinary(
                RequestMessage.build(gremlin).create(), new UnpooledByteBufAllocator(false));

        final CloseableHttpClient httpclient = HttpClients.createDefault();
        final HttpPost httppost = new HttpPost(TestClientFactory.createURLString());
        httppost.addHeader(HttpHeaders.CONTENT_TYPE, Serializers.GRAPHBINARY_V4.getValue());
        httppost.addHeader(HttpHeaders.ACCEPT, Serializers.GRAPHBINARY_V4.getValue());
        httppost.setEntity(new ByteArrayEntity(serializedRequest.array()));

        try (final CloseableHttpResponse response = httpclient.execute(httppost)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertTrue(response.getEntity().isChunked());

            final ResponseMessage responseMessage = serializer.readChunk(toByteBuf(response.getEntity()), true);
            assertEquals(17, ((List)responseMessage.getResult().getData()).size());

            final Header[] footers = getTrailingHeaders(response);
            assertEquals(1, footers.length);
            assertEquals("code", footers[0].getName());
            assertEquals("200", footers[0].getValue());
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java