Wrote create_task and its unit test.