test: add a test for indexed case