test cases for exeptions