Added tests to check for exceptions