tests for various modes and cleaner implementation in DynamicSequentialTask