private void negativeString(final String username, final String traversalSource) {
        try {
            authorizer.authorize(new AuthenticatedUser(username), buildRequestMessage(traversalSource));
            fail("Test code did not fail while it should have failed!");
        } catch(AuthorizationException e) {
            assertEquals(REJECT_STRING, e.getMessage());
        }
    }
@author Marc de Lignie

Run with:
mvn test --projects gremlin-server -Dtest=AuthorizerTest
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/authz/AuthorizerTest.java