public async Task AddOrUpdate_WhenAnEntityIsAdded_ThenItCanBeRetrieved()
        {
            // arrange
            var entity = new TestType1Entity {
                Name = "test", Id = "1"
            };

            // act
            await _cacheType1.AddOrUpdate(entity);

            var retrievedEntity   = (await _cacheType1.GetItemsByIndex("name", entity.Name)).FirstOrDefault();
            var retrievedEntityId = (await _cacheType1.GetKeysByIndex("name", entity.Name)).FirstOrDefault();

            // assert
            Assert.That(retrievedEntity.Id, Is.EqualTo(entity.Id));
            Assert.That(retrievedEntity.Name, Is.EqualTo(entity.Name));
        }
        public async Task AddOrUpdate_WhenAnEntityIsAddedWithExpiryOf1Second_ThenItCannotBeRetrieved()
        {
            // arrange
            var entity = new TestType1Entity {
                Name = "test", Id = "1"
            };

            // act
            await _cacheType1WithExpiry.AddOrUpdate(entity);

            var retrievedEntityBeforeExpiry = (await _cacheType1.GetItemsByIndex("name", entity.Name)).FirstOrDefault();

            await Task.Delay(1500);

            var retrievedEntityAfterExpiry   = (await _cacheType1.GetItemsByIndex("name", entity.Name)).FirstOrDefault();
            var retrievedEntityIdAfterExpiry = (await _cacheType1.GetKeysByIndex("name", entity.Name)).FirstOrDefault();

            // assert
            Assert.That(retrievedEntityBeforeExpiry.Name, Is.EqualTo(entity.Name));
            Assert.That(retrievedEntityBeforeExpiry.Id, Is.EqualTo(entity.Id));

            Assert.That(retrievedEntityAfterExpiry, Is.Null);
            Assert.That(retrievedEntityIdAfterExpiry, Is.Null);
        }