Replacing exception with custom exception, added test cases