refactor indexing tests