public void RemoveWhere()
            {
                var dict = new ThreadSafeDictionary <int, int>(Enumerable.Range(0, 1000).Select(x => new KeyValuePair <int, int>(x, x * 2)));

                foreach (var kvp in dict.RemoveWhere((k, v) => k % 2 == 0))
                {
                    Assert.AreEqual(kvp.Key % 2, 0);
                }
                foreach (var kvp in dict)
                {
                    Assert.AreEqual(kvp.Key % 2, 1);
                }
                dict = new ThreadSafeDictionary <int, int>(Enumerable.Range(0, 1000).Select(x => new KeyValuePair <int, int>(x, x * 2)));
                Assert.AreEqual(dict.Remove((k, v) => v % 4 == 0), 500);
                Assert.AreEqual(dict.Count, 500);
                foreach (var kvp in Enumerable.Range(1000, 4000).Select(x => new KeyValuePair <int, int>(x, x * 2)))
                {
                    dict.Add(kvp);
                }
                Assert.AreEqual(dict.Count, 4500);
            }