Add unit tests for Dispatcher.