[SPARK-2878]: Update the test case to match the updated exception message