@Before
    public void setup() {
        final Map<String, Object> config = new HashMap<>();
        final String yamlName = "org/apache/tinkerpop/gremlin/server/allow-list.yaml";
        String file = Objects.requireNonNull(getClass().getClassLoader().getResource(yamlName)).getFile();
        config.put(AllowListAuthorizer.KEY_AUTHORIZATION_ALLOWLIST, file);
        authorizer = new AllowListAuthorizer();
        authorizer.setup(config);
    }
@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