def METHOD_NAME(mock_tools, tmp_path):
    """If the download archive is corrupted, the validator fails."""
    # Mock the environment as if there is not WiX variable
    mock_tools.os.environ.get.return_value = None
    # Mock the download
    wix_path = tmp_path / "tools" / "wix"
    wix_zip_path = os.fsdecode(tmp_path / "tools" / "wix.zip")
    wix_zip = MagicMock()
    wix_zip.__fspath__.return_value = wix_zip_path
    mock_tools.download.file.return_value = wix_zip
    # Mock an unpack failure
    mock_tools.shutil.unpack_archive.side_effect = EOFError
    # Verify the install. This will trigger a download,
    # but the unpack will fail
    with pytest.raises(BriefcaseCommandError, match="interrupted or corrupted"):
        WiX.verify(mock_tools)
    # The environment was queried.
    mock_tools.os.environ.get.assert_called_with("WIX")
    # A download was initiated
    mock_tools.download.file.assert_called_with(
        url=WIX_DOWNLOAD_URL,
        download_path=tmp_path / "tools",
        role="WiX",
    )
    # The download was unpacked.
    mock_tools.shutil.unpack_archive.assert_called_with(
        os.fsdecode(wix_zip_path), extract_dir=os.fsdecode(wix_path)
    )
    # The zip file was not removed
    assert wix_zip.unlink.call_count == 0