@Test
    public void shouldFailWithBadScriptEval() throws Exception {
        try (SimpleClient client = TestClientFactory.createSimpleHttpClient()) {
            final RequestMessage request = RequestMessage
                    .build("new String().doNothingAtAllBecauseThis is a syntax error")
                    .addLanguage("gremlin-groovy")
                    .create();
            final List<ResponseMessage> responses = client.submit(request);
            assertEquals(HttpResponseStatus.INTERNAL_SERVER_ERROR, responses.get(0).getStatus().getCode());
            for (ResponseMessage resp : responses.subList(1, responses.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