@Override
    public RequestHandlerSpec requestHandlerSpec() {
        return RequestHandlerSpec.builder()
                .withAclMapping(requestView -> getAclMapping(requestView.method(), requestView.uri()))
                .build();
    }
@Test
    void resolves_correct_acl_action() {
        AclMapping.Action customAclAction = AclMapping.Action.custom("custom-action");
        RestApi restApi = RestApi.builder()
                .addRoute(route("/api1")
                        .get(ctx -> new MessageResponse(ctx.aclAction().name()),
                                handlerConfig().withCustomAclAction(customAclAction)))
                .addRoute(route("/api2")
                        .post(ctx -> new MessageResponse(ctx.aclAction().name())))
                .build();

        verifyJsonResponse(restApi, Method.GET, "/api1", null, 200, "{\"message\":\"custom-action\"}");
        verifyJsonResponse(restApi, Method.POST, "/api2", "ignored", 200, "{\"message\":\"write\"}");

        RequestHandlerSpec spec = restApi.requestHandlerSpec();
        assertRequestHandlerSpecAclMapping(spec, customAclAction, Method.GET, "/api1");
        assertRequestHandlerSpecAclMapping(spec, AclMapping.Action.WRITE, Method.POST, "/api2");
    }