protected void SetupErrorHandler(bool rethrowExceptions)
 {
     ErrorHandler = MockRepository.GenerateStub<ErrorHandler>(
         QueueEndpointProvider,
         RabbitMqFactory,
         ChannelConfigurator,
         MockRepository.GenerateStub<RabbitMqLogger>()
         );
     ErrorHandler.Stub(x => x.ShouldRethrowExceptions(this.QueueEndpoint.Name))
                 .Return(rethrowExceptions);
 }