public void Can_serialize_and_deserialize_an_event() { var eventStub = new EventStub(1); var streamMessage = new NewStreamMessage(Guid.NewGuid(), eventStub.GetType().AssemblyQualifiedName, SimpleJson.SerializeObject(eventStub), "\"metadata\""); var jsonData = streamMessage.JsonData; var data = SimpleJson.DeserializeObject <EventStub>(jsonData); Assert.Equal(eventStub.Value, data.Value); }