Fix tests for change in exception type