public async Task Delegates_CallsAcquire_OnFailure()
        {
            string token  = Guid.NewGuid().ToString();
            bool   called = false;
            ChangeFeedProcessorHealthMonitorCore monitor = new ChangeFeedProcessorHealthMonitorCore();

            monitor.SetLeaseAcquireDelegate((string leaseToken) =>
            {
                called = true;
                Assert.AreEqual(token, leaseToken);
                throw new Exception("Should not fail process");
            });

            await monitor.NotifyLeaseAcquireAsync(token);

            Assert.IsTrue(called);
        }
        public async Task Delegates_CallsAcquire()
        {
            string token  = Guid.NewGuid().ToString();
            bool   called = false;
            ChangeFeedProcessorHealthMonitorCore monitor = new ChangeFeedProcessorHealthMonitorCore();

            monitor.SetLeaseAcquireDelegate((string leaseToken) =>
            {
                called = true;
                Assert.AreEqual(token, leaseToken);
                return(Task.CompletedTask);
            });

            await monitor.NotifyLeaseAcquireAsync(token);

            Assert.IsTrue(called);
        }