def METHOD_NAME(rule_runner: RuleRunner) -> None:
    rule_runner.write_files(
        {
            "BUILD": "resources(name='root', sources=['**/*.txt'])",
            "one.txt": "",
            "two.txt": "",
            "three/four.txt": "",
            "three/five.txt": "",
            "three/six/seven/eight.txt": "",
            "3rdparty/jvm/default.lock": EMPTY_JVM_LOCKFILE,
        }
    )
    # Building the generator target should exclude the individual files and result in a single jar
    # for the generator.
    classpath = rule_runner.request(
        Classpath, [Addresses([Address(spec_path="", target_name="root")])]
    )
    contents = rule_runner.request(DigestContents, list(classpath.digests()))
    assert contents[0].path == ".root.resources.jar"
    resources_filenames = set(filenames_from_zip(contents[0]))
    expected = {
        "one.txt",
        "two.txt",
        "three/",
        "three/four.txt",
        "three/five.txt",
        "three/six/",
        "three/six/seven/",
        "three/six/seven/eight.txt",
    }
    assert resources_filenames == expected
    # But requesting a single file should individually package it.
    classpath = rule_runner.request(
        Classpath,
        [Addresses([Address(spec_path="", target_name="root", relative_file_path="one.txt")])],
    )
    contents = rule_runner.request(DigestContents, list(classpath.digests()))
    assert contents[0].path == ".one.txt.root.resources.jar"
    assert filenames_from_zip(contents[0]) == ["one.txt"]