Fix mock deprecation.