public void TestNullValue()
        {
            var kvp = new KeyValuePair<string, object>("key", null);
            var json = kvp.ToJson();
            var expected = "{ 'k' : 'key', 'v' : null }".Replace("'", "\"");
            Assert.AreEqual(expected, json);

            var bson = kvp.ToBson();
            var rehydrated = BsonSerializer.Deserialize<KeyValuePair<string, object>>(bson);
            Assert.IsTrue(bson.SequenceEqual(rehydrated.ToBson()));
        }
        public void TestNullKey()
        {
            var kvp = new KeyValuePair<string, object>(null, "value");
            var json = kvp.ToJson();
            var expected = "{ 'k' : null, 'v' : 'value' }".Replace("'", "\"");
            Assert.Equal(expected, json);

            var bson = kvp.ToBson();
            var rehydrated = BsonSerializer.Deserialize<KeyValuePair<string, object>>(bson);
            Assert.True(bson.SequenceEqual(rehydrated.ToBson()));
        }