adding test case for exception