unit test for EventEmitter