Created Task class and corresponding tests.