Unit tests for CommandDispatcher