Added test for getIdxById