Fix exception class imports to fix tests.