Mock out ensure_index.