def METHOD_NAME(self) -> None:
    config = Config([])
    driver = LegateDriver(config, system)
    spec = m.generate_kernel_spec(driver, config)
    expected_env = {
        k: v for k, v in driver.env.items() if k in driver.custom_env_vars
    }
    expected_env[
        m.LEGATE_JUPYTER_KERNEL_SPEC_KEY
    ] = config.kernel.spec_name
    assert spec.display_name == config.kernel.display_name
    assert spec.language == "python"  # type: ignore
    assert spec.argv[:-3] == list(driver.cmd)  # type: ignore
    assert spec.argv[-3].endswith("_legion_kernel.py")  # type: ignore
    assert spec.argv[-2:] == ["-f", "{connection_file}"]  # type: ignore
    assert spec.env == expected_env  # type: ignore
    assert m.LEGATE_JUPYTER_METADATA_KEY in spec.metadata
    metadata = spec.metadata[m.LEGATE_JUPYTER_METADATA_KEY]
    assert metadata == {
        "argv": config.argv[1:],
        "multi_node": asdict(config.multi_node),
        "memory": asdict(config.memory),
        "core": asdict(config.core),
    }