def METHOD_NAME(mocker, fake_ansible_module, XenAPI, xenserver):
    """Tests that proper scheme is prepended to hostname without scheme."""
    mocker.patch('XenAPI.Session')
    xapi_session = xenserver.XAPI.connect(fake_ansible_module)
    hostname = fake_ansible_module.params['hostname']
    ignore_ssl = not fake_ansible_module.params['validate_certs']
    XenAPI.Session.assert_called_once_with("http://%s" % hostname, ignore_ssl=ignore_ssl)