refactored tests for catchException