def METHOD_NAME(mocker, fake_ansible_module, XenAPI, xenserver):
    """Tests if XAPI.connect() returns singleton."""
    mocker.patch('XenAPI.Session')
    xapi_session1 = xenserver.XAPI.connect(fake_ansible_module)
    xapi_session2 = xenserver.XAPI.connect(fake_ansible_module)
    XenAPI.Session.assert_called_once()
    assert xapi_session1 == xapi_session2