Fix the test cases with changed error message. Merge related test cases