Added tests for EventDispatcher