public void CommitPublishingSequenceNumberTransitionsState()
        {
            var expectedSequence = 8675309;

            var eventData = new EventData(Array.Empty <byte>())
            {
                PendingPublishSequenceNumber = expectedSequence
            };

            Assert.That(eventData.PendingPublishSequenceNumber, Is.EqualTo(expectedSequence), "The pending sequence number should have been set.");

            eventData.CommitPublishingSequenceNumber();

            Assert.That(eventData.PublishedSequenceNumber, Is.EqualTo(expectedSequence), "The published sequence number should have been set.");
            Assert.That(eventData.PendingPublishSequenceNumber, Is.EqualTo(default(int?)), "The pending sequence number should have been cleared.");
        }