Add tests for collecting task results.