Make XXXEventListener as friend class of XXXEvent. Move the test of eventdispatchertest.