@Test
  public void testSafeQueryTime() throws Exception {
    IndexManager.resetIndexBufferTime();
    // fake entry update at LMT of 0 and actual time of 10
    // safe query time set in index manager is going to be 20
    IndexManager.setIndexBufferTime(0, 10);

    // fake query start at actual time of 9, 10, 11 and using the fake LMT of 0
    assertTrue(IndexManager.needsRecalculation(9, 0));
    assertTrue(IndexManager.needsRecalculation(10, 0));
    assertFalse(IndexManager.needsRecalculation(11, 0));

    assertFalse(IndexManager.needsRecalculation(9, -3)); // old enough updates shouldn't trigger a
                                                         // recalc
    assertTrue(IndexManager.needsRecalculation(9, -2)); // older updates but falls within the delta
                                                        // (false positive)

    assertTrue(IndexManager.needsRecalculation(10, 5));
    // This should eval to true only because of false positives.
    assertTrue(IndexManager.needsRecalculation(11, 5));

    // Now let's assume a new update has occurred, this update delta and time combo still is not
    // larger
    IndexManager.setIndexBufferTime(0, 9);
    IndexManager.setIndexBufferTime(1, 10);

    // Now let's assume a new update has occurred where the time is larger (enough to roll off the
    // large delta)
    // but the delta is smaller
    IndexManager.setIndexBufferTime(30, 30);

    // Now that we have a small delta, let's see if a query that was "stuck" would reevaluate
    // appropriately
    assertTrue(IndexManager.needsRecalculation(9, 0));
  }
This test is for a fix for #47475 We added a way to determine whether to reevaluate an entry
for query execution The method is to keep track of the delta and current time in a single long
value The value is then used by the query to determine if a region entry needs to be
reevaluated based on subtracting the value with the query execution time. This provides a delta
+ some false positive time If the delta + last modified time of the region entry is > query
start time, we can assume that it needs to be reevaluated
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/IndexManagerJUnitTest.java