def METHOD_NAME(mock_config, headers, is_good):
    # flexmock config before import as it fails on looking for config
    flexmock(ServiceConfig).should_receive("get_service_config").and_return(
        flexmock(ServiceConfig)
    )
    from packit_service.service.api import webhooks
    if "X-Gitlab-Token" not in headers and not is_good:
        flexmock(webhooks.GitlabWebhook).should_receive(
            "create_confidential_issue_with_token"
        ).mock()
    webhooks.config = mock_config
    temp = webhooks.GitlabWebhook()
    with Flask(__name__).test_request_context():
        payload = {
            "project": {
                "http_url": "https://gitlab.com/multi/part/namespace/repo.git",
            }
        }
        request._cached_data = request.data = dumps(payload).encode()
        request.headers = headers
        if not is_good:
            with pytest.raises(ValidationFailed):
                webhooks.GitlabWebhook.validate_token(temp)
        else:
            webhooks.GitlabWebhook.validate_token(temp)