added tests for exceptions