public void RaiseConfigurationChanged()
        {
            this.Receiver.SubscribeForChannels(MessageBusChannel.ConfigurationChanged);

            Guid taskProcessorId = Guid.NewGuid();

            TaskProcessorEventArgs args = Helpers.WaitForEvent <TaskProcessorEventArgs>(
                this.Timeout,
                handler => this.Receiver.ConfigurationChanged += handler,
                () => this.Sender.NotifyConfigurationChanged(taskProcessorId));

            Assert.AreEqual(taskProcessorId, args.TaskProcessorId);
        }
        public void RaiseTaskProcessorStopRequested()
        {
            Guid taskProcessorId = Guid.NewGuid();

            this.Receiver.SubscribeForChannels(MessageBusChannel.StopTaskProcessor);

            TaskProcessorEventArgs args = Helpers.WaitForEvent <TaskProcessorEventArgs>(
                this.Timeout,
                handler => this.Receiver.StopRequested += handler,
                () => this.Sender.NotifyStopRequested(taskProcessorId));

            Assert.AreEqual(taskProcessorId, args.TaskProcessorId);
        }