reactor pattern test, and add testcase for EventLoop class