Added unit test for EventEngineService and several bug fixes