Add tests for pipeline with multi-threaded stages.