add a test to check if exeception is raised