Added test cases for validateTask()