def METHOD_NAME() -> None:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *util_rules(),
            *jvm_tool.rules(),
            *lockfile_rules(),
            generate_test_tool_lockfile_request,
            generate_internal_test_tool_lockfile_request,
            *MockJvmTool.rules(),
            QueryRule(GenerateJvmLockfile, (MockJvmToolLockfileSentinel,)),
            QueryRule(GenerateJvmLockfile, (MockInternalToolLockfileSentinel,)),
            QueryRule(DigestContents, (Digest,)),
        ],
        target_types=[JvmArtifactTarget],
    )
    rule_runner.set_options(
        args=[
            "--mock-tool-artifacts=//:junit_junit",
            "--mock-tool-lockfile=/dev/null",
        ],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    rule_runner.write_files(
        {
            "BUILD": textwrap.dedent(
                """\
            jvm_artifact(
              name="junit_junit",
              group="junit",
              artifact="junit",
              version="4.13.2",
            )
            """
            )
        }
    )
    lockfile_request = rule_runner.request(GenerateJvmLockfile, [MockJvmToolLockfileSentinel()])
    coordinates = sorted(i.coordinate for i in lockfile_request.artifacts)
    assert coordinates == [
        Coordinate(group="junit", artifact="junit", version="4.13.2"),
        Coordinate(group="org.hamcrest", artifact="hamcrest-core", version="1.3"),
    ]
    # Ensure that an internal-only tool will not have a lockfile generated.
    default_lockfile_result = rule_runner.request(
        GenerateJvmLockfile, [MockInternalToolLockfileSentinel()]
    )
    assert default_lockfile_result.lockfile_dest == DEFAULT_TOOL_LOCKFILE