Fixed exception type in test