public async Task ProcessAsync_AnItemInQueue_ReturnsTrue()
        {
            var queue          = new SingleItemStatefulQueue(new StringItem("An item"));
            var handler        = new FakePayloadHandler();
            var queueProcessor = new StatefulQueueProcessor <string>(queue, handler);

            var processed = await queueProcessor.ProcessAsync();

            Assert.IsTrue(processed);
        }
        public async Task ProcessAsync_NoExceptionWhileProcessingItem_UpdatesItem()
        {
            var queue          = new SingleItemStatefulQueue(new StringItem("An item"));
            var handler        = new FakePayloadHandler();
            var queueProcessor = new StatefulQueueProcessor <string>(queue, handler);

            await queueProcessor.ProcessAsync();

            Assert.IsTrue(queue.UpdateWasCalled);
        }
        public async Task ProcessAsync_EmptyQueue_ReturnsFalse()
        {
            var queue          = new EmptyStatefulQueue();
            var handler        = new FakePayloadHandler();
            var queueProcessor = new StatefulQueueProcessor <string>(queue, handler);

            var processed = await queueProcessor.ProcessAsync();

            Assert.IsFalse(processed);
        }