def METHOD_NAME(rule_runner: RuleRunner) -> None:
    rule_runner.write_files(
        {
            "src/openapi/foo/BUILD": textwrap.dedent(
                """\
            openapi_sources(
                dependencies=['!src/openapi/bar/models.json', 'src/openapi/bar/models.yaml'],
            )
            """
            ),
            "src/openapi/foo/openapi.json": textwrap.dedent(
                """\
            {
                "foo": {
                    "$ref": "../bar/models.json"
                }
            }
            """
            ),
            "src/openapi/bar/BUILD": "openapi_sources()\n",
            "src/openapi/bar/models.json": "{}",
            "src/openapi/bar/models.yaml": "{}",
        }
    )
    target = rule_runner.get_target(Address("src/openapi/foo", relative_file_path="openapi.json"))
    inferred_deps = rule_runner.request(
        InferredDependencies,
        [
            InferOpenApiSourceDependenciesRequest(
                OpenApiSourceDependenciesInferenceFieldSet.create(target)
            )
        ],
    )
    assert inferred_deps == InferredDependencies(
        FrozenOrderedSet(
            [
                Address("src/openapi/bar", relative_file_path="models.yaml"),
            ]
        ),
    )