def METHOD_NAME(
    self, mocker: MockerFixture, capsys: Capsys
) -> None:
    install_mock = mocker.patch(
        "jupyter_client.kernelspec.KernelSpecManager.install_kernel_spec"
    )
    config = Config(
        [
            "legate-jupyter",
            "-vv",
            "--name",
            "____fake_test_kernel_123abc_____",
        ]
    )
    driver = LegateDriver(config, system)
    spec = m.generate_kernel_spec(driver, config)
    m.install_kernel_spec(spec, config)
    assert install_mock.call_count == 1
    assert install_mock.call_args[0][1] == config.kernel.spec_name
    assert install_mock.call_args[1] == {
        "user": config.kernel.user,
        "prefix": config.kernel.prefix,
    }
    out, _ = capsys.readouterr()
    spec_json = json.dumps(spec.to_dict(), sort_keys=True, indent=2)
    assert out == (
        f"Wrote kernel spec file {config.kernel.spec_name}/kernel.json\n\n"
        f"\n{spec_json}\n\n"
        f"Jupyter kernel spec {config.kernel.spec_name} "
        f"({config.kernel.display_name}) "
        "has been installed\n"
    )