@Override
    public int compareTo(Object o) {
      if (o instanceof CompObject) {
        CompObject other = (CompObject) o;
        if (value > other.value) {
          return 1;
        } else if (value == other.value) {
          return 0;
        } else {
          return -1;
        }
      }
      throw new ClassCastException("Could not cast " + o.getClass().getName() + " to compObject");
    }
Test to check if Region short cut method is used for querying, the Primary key index
utilization occurs or not
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexUseJUnitTest.java