Add some tests for indices handling