public void TryExtendLock_ContactExistsLockedByDifferentOwner_NotExtended(
            DataAdapterProvider provider,
            IContact contact,
            LeaseOwner them,
            LeaseOwner us,
            TestIndexUtils contactIndex)
        {
            using (contactIndex)
            {
                // lock by a different owner
                provider.SaveContact(contact, new ContactSaveOptions(false, them, TimeSpan.FromMinutes(1)))
                    .Should().Be(true);

                // extend it
                contact.Lease.Owner = us;
                var res = provider.TryExtendContactLockLease(contact, TimeSpan.FromHours(1));

                res.Should().BeFalse();
                // In Andes, owner is not updated to reflect the persistence layer, so we do the same here.
                contact.Lease.Owner.Identifier.Should().Be(us.Identifier);
            }
        }
        public void TryExtendLock_ContactExistsLockedBySameOwner_LeaseExtended(
            DataAdapterProvider provider,
            IContact contact,
            LeaseOwner leaseOwner,
            TestIndexUtils contactIndex)
        {
            using (contactIndex)
            {
                provider.SaveContact(contact, new ContactSaveOptions(false, leaseOwner, TimeSpan.FromMinutes(1)))
                    .Should().Be(true);

                contact.Lease.Owner = leaseOwner;
                var res = provider.TryExtendContactLockLease(contact, TimeSpan.FromHours(1));

                res.Should().BeTrue();
                contact.Lease.Owner.Identifier.Should().Be(leaseOwner.Identifier);
            }
        }