Test EZP-22775: Add unit test coverage for exception handling