def test_hooks_fetch_error(self, test_hook_count):
        """Test if the correct hooks are fired when the XML fails to be
        fetched from DOV.

        Parameters
        ----------
        test_hook_count : pytest.fixture
            Fixture removing default hooks and installing HookCounter.
        """
        bs = BoringSearch(objecttype=pydov.types.boring.Boring)

        bs.search(query=PropertyIsEqualTo(
            'pkey_boring', build_dov_url('data/boring/2004-103984')))

        assert pydov.hooks[0].count_wfs_search_init == 1
        assert pydov.hooks[0].count_wfs_search_result == 1
        assert pydov.hooks[0].count_wfs_search_result_received == 1

        assert pydov.hooks[0].count_xml_received == 0
        assert pydov.hooks[0].count_xml_cache_hit == 0
        assert pydov.hooks[0].count_xml_downloaded == 0
        assert pydov.hooks[0].count_xml_stale_hit == 0
        assert pydov.hooks[0].count_xml_fetch_error == 1

        assert pydov.hooks[0].count_meta_received > 0
        assert pydov.hooks[0].count_inject_meta_response > 0