MDL-43044 events: Add unit tests