Q:

Magento2 rewrite _prepareCollection method in wishlist returning blank page

I am trying to rewrite the protected function _prepareCollection method inside \Magento\Wishlist\Block\Customer\Wishlist however the wishlist page in my account now returns blank and it never makes it into the rewritten method. 
Here is my di.xml 
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Wishlist\Block\Customer\Wishlist" type="Namespace\Module\Block\Customer\Favorites" />
</config>

And here is my php file located at Namespace/Module/Block/Customer/Favorites
<?php

namespace Namespace\Module\Block\Customer;

class Favorites extends \Magento\Wishlist\Block\Customer\Wishlist
{
    protected function _prepareCollection($collection)
    {
      parent::_prepareCollection($collection);
      die('working');
    }
}

Am i missing something here ? I know that I can't use a plugin because they don't work with protected methods. Is that now the same with class rewrites as well ? Help!

A:

Worked like a charm. Was trying to add a function for delete all wishlist by extending \Magento\Wishlist\Block\Customer\Wishlist but wasn't giving the desired output, but after adding the constructor it worked.

