Fix missing Exception in tests.