Slightly refactor index tests