Added unit tests for EventEmitter