refactor TaskDispatcher spec