@Test
    public void shouldFailIfSslEnabledOnServerButNotClient() throws Exception {
        final Cluster cluster = TestClientFactory.open();
        final Client client = cluster.connect();

        try {
            client.submit("g.inject(2)").all().get();
            fail("This should not succeed as the client did not enable SSL");
        } catch (Exception ex) {
            assertThat(ex, instanceOf(ExecutionException.class));
            final Throwable root = ExceptionHelper.getRootCause(ex);
            assertThat(root.getMessage(), containsString("The server may be expecting SSL to be enabled"));
        } finally {
            cluster.close();
        }
    }
Configure specific Gremlin Server settings for specific tests.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java