Added tests for exceptions.