Add test for serializing an event