Added tests for exceptions