def METHOD_NAME(aggregator, dd_run_check, new_check, instance, report_event):
    instance['included_messages'] = ['bar']
    check = new_check(instance)
    report_event('foo')
    report_event('bar')
    report_event('baz')
    dd_run_check(check)
    assert len(aggregator.events) == 1
    aggregator.assert_event('bar')