def METHOD_NAME(tmp_path, first_app_config):
    command = GradleOpenCommand(
        logger=Log(),
        console=Console(),
        base_path=tmp_path / "base_path",
        data_path=tmp_path / "briefcase",
    )
    command.tools.os = MagicMock(spec_set=os)
    command.tools.subprocess = MagicMock(spec_set=Subprocess)
    command.tools.download = MagicMock(spec_set=Download)
    # Mock all apps as targeting version 0.3.15
    command._briefcase_toml = defaultdict(
        lambda: {"briefcase": {"target_version": "0.3.15"}}
    )
    # Mock some OS calls needed to make the tools appear to exist
    command.tools.os.environ = {}
    command.tools.os.access.return_value = True
    # Mock the file marking licenses as accepted
    create_file(
        tmp_path
        / "briefcase"
        / "tools"
        / "android_sdk"
        / "licenses"
        / "android-sdk-license",
        "license accepted",
    )
    return command