Added exception test case.