def METHOD_NAME(configuration, metadata, folder_path, file_list, create_files_in_folder,
                                truncate_monitored_files, set_wazuh_configuration,
                                configure_local_internal_options_function, restart_wazuh_function):
    '''
    description: Check logcollector expands wildcards and monitors target file properly.
    test_phases:
        - Setup:
           - Create file to monitor logs
           - Truncate ossec.log file
           - Set ossec.conf and local_internal_options.conf
           - Restart the wazuh daemon
        - Test:
           - Check if the wildcards expanded and matches file
           - Insert the log message.
           - Check expected response.
        - Teardown:
           - Delete the monitored file
           - Restore ossec.conf and local_internal_options.conf
           - Stop Wazuh
    wazuh_min_version: 4.5.0
    tier: 1
    parameters:
        - configuration:
            type: dict
            brief: Wazuh configuration data. Needed for set_wazuh_configuration fixture.
        - metadata:
            type: dict
            brief: Wazuh configuration metadata
        - folder_path:
            type: str
            brief: path for folder to be created and monitored
        - files_list:
            type: List
            brief: list of filenames to be created inside folder_path
        - create_files_in_folder:
            type: fixture
            brief: Create a list of files file inside target folder
        - truncate_monitored_files:
            type: fixture
            brief: Truncate all the log files and json alerts files before and after the test execution.
        - set_wazuh_configuration:
            type: fixture
            brief: Set the wazuh configuration according to the configuration data.
        - configure_local_internal_options:
            type: fixture
            brief: Configure the local_internal_options file.
        - restart_wazuh_function:
            type: fixture
            brief: Restart wazuh.
    assertions:
        - Check that when configuring location with wildcards it expands and matches file
        - Check that logcollector is analyzing the log file.
        - Check that logs are ignored when they match with configured regex
    input_description:
        - The `configuration_win_location_wildcards.yaml` file provides the module configuration for this test.
        - The `cases_win_location_wildcards` file provides the test cases.
    expected_output:
        - r".*wazuh-agent.*expand_win32_wildcards.*DEBUG: No file/folder that matches {regex}"
        - r".*wazuh-agent.*check_pattern_expand.*New file that matches the '{file_path}' pattern: '(.*)'"
        - r".*wazuh-agent.*Analizing file: '{file}'.*"
        - r".*wazuh-agent.*DEBUG: Reading syslog '{message}'.*"
    '''
    command = f"echo {log_sample}>> {test_file}"
    file = re.escape(test_file)
    if not metadata['matches']:
        # If it does not match, check that message shows no matching file was found
        evm.check_win_wildcard_pattern_no_match(re.escape(metadata['location']), prefix)
    else:
        # Check that pattern is expanded to configured file
        evm.check_wildcard_pattern_expanded(file, re.escape(metadata['location']), prefix)
        # Check log file is being analized
        evm.check_analyzing_file(file=file, prefix=prefix)
        # Insert log
        run_local_command_returning_output(command)
        # Check the log is read from the monitored file
        evm.check_syslog_message(message=log_sample, prefix=prefix)