tests for exceptions