You can simplify this with assertEquals([1,3,5], indices);