Added tests and implementation to create events.