Changed exception type in test