Add unittests for dispatching action