Added tests for factory tasks.