def test_invoke_url_exception(self, invoker=None):
        '''This test case ensures invoke url internal exceptions are converted to concrete exceptions.'''

        app = Mock(side_effect=Exception("Unexpected exception"))

        if not invoker:
            invoker = FantasticoUrlInternalInvoker(app, self._wsgi_environ)

        invoker._app = app

        with self.assertRaises(FantasticoUrlInvokerError) as ex_ctx:
            invoker.invoke_url("/simle/url", [])

        self.assertTrue(str(ex_ctx.exception).find("Unexpected exception") > -1)

        return invoker
    def test_invoke_url_exception(self, invoker=None):
        '''This test case ensures invoke url internal exceptions are converted to concrete exceptions.'''

        app = Mock(side_effect=Exception("Unexpected exception"))

        if not invoker:
            invoker = FantasticoUrlInternalInvoker(app, self._wsgi_environ)

        invoker._app = app

        with self.assertRaises(FantasticoUrlInvokerError) as ex_ctx:
            invoker.invoke_url("/simle/url", [])

        self.assertTrue(
            str(ex_ctx.exception).find("Unexpected exception") > -1)

        return invoker