def METHOD_NAME(config, syslog_ng, input_message, template, expected_value):
    config.add_include("scl.conf")
    generator_source = config.create_example_msg_generator_source(num=1, template=config.stringify(input_message))
    syslog_parser = config.create_syslog_parser(flags="syslog-protocol")
    app_parser = config.create_app_parser(topic="syslog")
    file_destination = config.create_file_destination(file_name="output.log", template=config.stringify(template + '\n'))
    config.create_logpath(statements=[generator_source, syslog_parser, app_parser, file_destination])
    syslog_ng.start(config)
    assert file_destination.read_log().strip() == expected_value