@Test
    public void shouldHaveSameVertexResultsWithGremlinLangOrGremlinGroovy() throws Exception {
        String gremlinLangResult;
        String gremlinGroovyResult;

        final CloseableHttpClient httpclient = HttpClients.createDefault();
        final HttpPost httppost = new HttpPost(TestClientFactory.createURLString());
        httppost.setEntity(new StringEntity("{\"gremlin\":\"g.V()\",\"language\":\"gremlin-lang\",\"g\":\"gmodern\"}", Consts.UTF_8));

        try (final CloseableHttpResponse response = httpclient.execute(httppost)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertEquals("application/json", response.getEntity().getContentType().getValue());
            final String json = EntityUtils.toString(response.getEntity());
            final JsonNode node = mapper.readTree(json);
            gremlinLangResult = node.get("result").get(TOKEN_DATA).get(GraphSONTokens.VALUEPROP).toString();
        }

        httppost.setEntity(new StringEntity("{\"gremlin\":\"g.V()\",\"language\":\"gremlin-groovy\",\"g\":\"gmodern\"}", Consts.UTF_8));
        try (final CloseableHttpResponse response = httpclient.execute(httppost)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertEquals("application/json", response.getEntity().getContentType().getValue());
            final String json = EntityUtils.toString(response.getEntity());
            final JsonNode node = mapper.readTree(json);
            gremlinGroovyResult = node.get("result").get(TOKEN_DATA).get(GraphSONTokens.VALUEPROP).toString();
        }

        assertEquals(gremlinGroovyResult, gremlinLangResult);
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java