Added unit tests for the event manager