Added some test cases to the unit test for testing the exceptions.