@Test
    public void should200OnPOSTWithGremlinQueryStringArgumentWithIteratorResultTextPlain() throws Exception {
        final CloseableHttpClient httpclient = HttpClients.createDefault();
        final HttpPost httppost = new HttpPost(TestClientFactory.createURLString());
        httppost.setEntity(new StringEntity("{\"gremlin\":\"g.V()\",\"g\":\"gclassic\"}", Consts.UTF_8));
        final String mime = "text/plain";
        httppost.addHeader("Accept", mime);

        try (final CloseableHttpResponse response = httpclient.execute(httppost)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertEquals(mime, response.getEntity().getContentType().getValue());
            final String text = EntityUtils.toString(response.getEntity());
            final String[] split = text.split(System.lineSeparator());
            assertEquals(6, split.length);
            for (String line : split) {
                assertThat(line, matchesRegex("==>v\\[\\d\\]"));
            }
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java