def METHOD_NAME(
    instance, aggregator, test_case_name, request_mock_effects, expected_tags, expect_exception, expected_status
):
    check = MesosSlave('mesos_slave', {}, [instance])
    with mock.patch('datadog_checks.base.utils.http.requests') as r:
        r.get.side_effect = request_mock_effects
        try:
            check._process_stats_info('http://hello.com', instance['tags'])
            assert not expect_exception
        except Exception:
            if not expect_exception:
                raise
    aggregator.assert_service_check('mesos_slave.can_connect', count=1, status=expected_status, tags=expected_tags)