public void bson_serialize_message_test()
        {
            var          prop1 = "prop1";
            var          prop2 = "prop2";
            var          msg   = new WoftamEvent(prop1, prop2);
            MemoryStream ms    = new MemoryStream();
            var          bs    = new BsonDataWriter(ms);

            bs.WriteStartObject();
            bs.WritePropertyName(msg.GetType().FullName);
            bs.WriteValue(JsonConvert.SerializeObject(msg));
            bs.WriteEnd();
             
            ms.Seek(0, SeekOrigin.Begin);

            Message msg2;
            var     reader = new BsonDataReader(ms);

            // read object
            reader.Read();
            // read type name
            reader.Read();
            var messageType = MessageHierarchy.GetTypeByFullName((string)reader.Value);

            reader.Read(); //property value
            msg2 = (Message)JsonConvert.DeserializeObject((string)reader.Value, messageType);
            Assert.IsType <WoftamEvent>(msg2);
            Assert.Equal(prop1, ((WoftamEvent)msg2).Property1);
        }