public void handle_chain_finished()
        {
            MessageHistory.StartListening();

            var @event = new ChainExecutionStarted
            {
                ChainId = Guid.NewGuid(),
                Envelope = new EnvelopeToken()
            };

            var messageWatcher = new MessageWatcher();
            messageWatcher.Handle(@event);

            var finished = new ChainExecutionFinished
            {
                ChainId = @event.ChainId,
                Envelope = @event.Envelope
            };

            messageWatcher.Handle(finished);

            var received = MessageHistory.Received().Single();
            received.Id.ShouldBe(@event.Envelope.CorrelationId);
            received.Description.ShouldBe(finished.ToString());
            received.Type.ShouldBe(MessageWatcher.MessageTrackType);

            MessageHistory.Outstanding().Any().ShouldBeFalse();
        }
        public void handle_chain_finished()
        {
            MessageHistory.ClearHistory();

            var @event = new ChainExecutionStarted
            {
                ChainId = Guid.NewGuid(),
                Envelope = new EnvelopeToken()
            };

            var finished = new ChainExecutionFinished
            {
                ChainId = @event.ChainId,
                Envelope = @event.Envelope
            };

            var received = finished.ToMessageTrack();
            received.Id.ShouldBe(@event.Envelope.CorrelationId);
            received.Description.ShouldBe(finished.ToString());
            received.Type.ShouldBe(MessageLogRecord.MessageTrackType);

            MessageHistory.Outstanding().Any().ShouldBeFalse();
        }