Fix mock deprecation