Test getting index from the table