fixed the unit test case for event-dispatcher

cfrunlooprun() will not return until stopped, so none of the
event-dispatcher variables were getting initialized correctly
remove the test code from ui