Added test cases to check input validation.