added test for exception