public async Task StoresThenRemovesBySubjectAndClientAndType()
        {
            var grantsStore = new CassandraPersistedGrantStore(new MockKeyValueStore <string, PersistedGrant>());
            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "666", SubjectId = "Some App", ClientId = "mt", Type = "User"
            });

            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "111", SubjectId = "Some App", ClientId = "mt", Type = "Admin"
            });

            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "456", SubjectId = "Some App", ClientId = "jp", Type = "User"
            });

            await grantsStore.RemoveAllAsync("Some App", "mt", "User");

            var storedGrants = await grantsStore.GetAllAsync("Some App");

            storedGrants = storedGrants.ToArray();
            Assert.Equal(2, storedGrants.Count());
        }
        public async Task StoresThenFetchesBySubject()
        {
            var grantsStore = new CassandraPersistedGrantStore(new MockKeyValueStore <string, PersistedGrant>());
            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "321", SubjectId = "Some App"
            });

            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "456", SubjectId = "Some App"
            });

            await grantsStore.StoreAsync(new PersistedGrant()
            {
                Key = "789", SubjectId = "Some Other App"
            });

            var storedGrants = await grantsStore.GetAllAsync("Some App");

            Assert.Equal(2, storedGrants.Count());
        }