TaskDispatcherTests made more robust