Final fix: accidentally replaced expect with different exception.