@Test
    @SuppressWarnings("unchecked")
    public void shouldBatchResultsByTwos() throws Exception {
        try (SimpleClient client = TestClientFactory.createSimpleHttpClient()) {
            final RequestMessage request = RequestMessage.build("g.inject(0,1,2,3,4,5,6,7,8,9)").create();

            final List<ResponseMessage> msgs = client.submit(request);
            assertEquals(0, (int) msgs.get(0).getResult().getData().get(0));
            assertEquals(1, (int) msgs.get(0).getResult().getData().get(1));
            assertEquals(2, (int) msgs.get(1).getResult().getData().get(0));
            assertEquals(3, (int) msgs.get(1).getResult().getData().get(1));
            assertEquals(4, (int) msgs.get(2).getResult().getData().get(0));
            assertEquals(5, (int) msgs.get(2).getResult().getData().get(1));
            assertEquals(6, (int) msgs.get(3).getResult().getData().get(0));
            assertEquals(7, (int) msgs.get(3).getResult().getData().get(1));
            assertEquals(8, (int) msgs.get(4).getResult().getData().get(0));
            assertEquals(9, (int) msgs.get(4).getResult().getData().get(1));
            for (ResponseMessage resp : msgs.subList(5, msgs.size())) {
                assertEquals(0, resp.getResult().getData().size());
            }
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java