def METHOD_NAME(aggregator, dd_run_check):
    config = deepcopy(CACTI_CONFIG)
    config['rrd_whitelist'] = os.path.join(HERE, 'whitelist.txt')
    check = CactiCheck('cacti', {}, [config])
    mocks = _setup_mocks()
    # Run the check twice to set the timestamps and capture metrics on the second run
    dd_run_check(check)
    dd_run_check(check)
    for mock_func in mocks:
        mock_func.stop()
    # We are mocking the MySQL call so we won't have cacti.rrd.count or cacti.hosts.count metrics,
    # check for metrics that are returned from our mock data.
    aggregator.assert_metric('cacti.metrics.count', value=2, tags=CUSTOM_TAGS)
    aggregator.assert_metric('system.mem.buffered.max', value=2, tags=CUSTOM_TAGS)
    aggregator.assert_metric('system.mem.buffered', value=2, tags=CUSTOM_TAGS)
    aggregator.assert_metric('cacti.rrd.count', value=1, tags=CUSTOM_TAGS)
    aggregator.assert_metric('cacti.hosts.count', value=1, tags=CUSTOM_TAGS)
    aggregator.assert_all_metrics_covered()