Add exception test case.