Provide a way to stop and start command processing, perhaps initially only internally, say via a service method. This should help reduce the complexity/fragility of some of the tests.
While we might want to eventually support some public way to control this, that can come later.
dochan function receives a thread that implements ExecutorService interface. The actual implementation of the thread pool ThreadPoolExecutor. The ThreadPoolExecutor does not implement `pause`, but an example is given in the docs how one might extend the ThreadPoolExecutor and create a PausableThreadPoolExecutor.