Fixed Exceptions in the test cases