def METHOD_NAME(
    mock_find_connectable_master, mock_calculate_remote_masters, system_paasta_config
):
    mock_calculate_remote_masters.return_value = ([], "fakeERROR")
    with raises(SystemExit):
        sysdig.get_any_mesos_master("cluster1", system_paasta_config)
    mock_calculate_remote_masters.assert_called_with("cluster1", system_paasta_config)
    mock_masters = mock.Mock()
    mock_calculate_remote_masters.return_value = (mock_masters, "fake")
    mock_find_connectable_master.return_value = (False, "fakeERROR")
    with raises(SystemExit):
        sysdig.get_any_mesos_master("cluster1", system_paasta_config)
    mock_master = mock.Mock()
    mock_find_connectable_master.return_value = (mock_master, "fake")
    assert sysdig.get_any_mesos_master("cluster1", system_paasta_config) == mock_master