Add tests for task indexing functionality