Fixed error class and error test cases