private <T extends AbstractMapIndex> void verifyStatsForQueriesForValueInMapFieldWithAnyMapIndexWithStar(
      Class<T> indexType) {
    long keys = (indexType.cast(keyIndex1)).internalIndexStats.getNumberOfKeys();
    long mapIndexKeys =
        (indexType.cast(keyIndex1)).internalIndexStats.getNumberOfMapIndexKeys();
    long values =
        (indexType.cast(keyIndex1)).internalIndexStats.getNumberOfValues();
    long uses =
        (indexType.cast(keyIndex1)).internalIndexStats.getTotalUses();

    // The number of keys must be equal to the number of different values the
    // positions map takes for each key for each entry in the region (null not included):
    // "something", "nothing", "more", "empty", "hey", "tip"
    assertThat(keys).isEqualTo(6);
    // The number of mapIndexKeys must be equal to the number of different keys
    // that appear in entries of the region:
    // "IBM", "ERICSSON", "HP", "SUN", "cannotBeNull".
    assertThat(mapIndexKeys).isEqualTo(5);
    // The number of values must be equal to the number of values the
    // positions map takes for each key for each entry in the region:
    // "something", null, "nothing", "more", "empty", "hey", "more", "tip".
    assertThat(values).isEqualTo(8);
    // The index must be used in all the queries that have positions['SUN'] in the filter
    // except for those using "!=" to compare with it or when comparing it with null.
    assertThat(uses).isEqualTo(1);
  }
Test index object's comapreTo Function implementation correctness for indexes.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/MapRangeIndexMaintenanceJUnitTest.java