added test for exception (100% code coverage)