added tests for exception