Add test for custom exception handler