Added exception test cases.