Do the unit tests fully cover these scenarios?

Looks like we have at least the following:
  - max_iterations is None
    - no tasks returned.
    - one batch of tasks returned. (maybe doesn't need tested)
    - multiple batches of tasks returned.
  - max_iterations is 0
    - _run doesn't get called.
  - max_iterations > 0