added test for thrown exception