def METHOD_NAME(
    rule_runner: RuleRunner, openapi_lockfile: JVMLockfileFixture
) -> None:
    rule_runner.write_files(
        {
            "3rdparty/jvm/default.lock": openapi_lockfile.serialized_lockfile,
            "3rdparty/jvm/BUILD": openapi_lockfile.requirements_as_jvm_artifact_targets(),
            "src/openapi/BUILD": "openapi_document(name='petstore', source='petstore_spec.yaml', java_api_package='org.mycompany')",
            "src/openapi/petstore_spec.yaml": PETSTORE_SAMPLE_SPEC,
        }
    )
    def assert_gen(address: Address, expected: Iterable[str]) -> None:
        _assert_generated_files(
            rule_runner, address, source_roots=["src/openapi"], expected_files=expected
        )
    assert_gen(
        Address("src/openapi", target_name="petstore"),
        [
            "src/openapi/org/mycompany/PetsApi.java",
        ],
    )