Add simple test for custom exception