def METHOD_NAME(requests_mock, is_merged, expected):
    """
    Given: the links in a PR
    When: Running github action on PR
    Then: make sure the request to server is created correctly.
    """
    class OptionMock:
        def __init__(self, link, num, title, body, merged):
            self.pr_link = link
            self.pr_title = title
            self.pr_body = body
            self.is_merged = merged
            self.pr_num = num
            self.username = "test_user"
            self.password = "test_password"
            self.url = "http://test.com"
    post_mock = requests_mock.post(
        "http://test.com", status_code=200, json=[{"id": "1"}]
    )
    option_mock = OptionMock(
        "pr_link_example", "1", "dummy pr", PR_WITH_BOTH_BY_NEWLINE, is_merged
    )
    link_pr_to_jira_issue.trigger_generic_webhook(option_mock)
    res = post_mock.last_request.json()
    assert res.get("name") == f"{link_pr_to_jira_issue.GENERIC_WEBHOOK_NAME} - #1"
    assert "raw_json" in res
    assert "closeIssue" in res.get("raw_json")
    assert res.get("raw_json").get("JiraIssues") == expected
    assert res.get("raw_json").get("closeIssue") == str(is_merged).lower()