Added tests for dispatcher.