@Override
    public void doTestHook(final SPOTS spot, final DefaultQuery _ignored,
        final ExecutionContext executionContext) {
      try {
        switch (spot) {
          case ATTEMPT_REMOVE:
            if (!readyToStartRemoveLatch.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError("Time ran out waiting for other thread to initiate put");
            }
            break;
          case BEGIN_TRANSITION_FROM_ELEMARRAY_TO_CONCURRENT_HASH_SET:
            readyToStartRemoveLatch.countDown();
            if (!waitForRemoveLatch.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError("Time ran out waiting for other thread to initiate remove");
            }
            break;
          case BEGIN_REMOVE_FROM_ELEM_ARRAY:
            waitForRemoveLatch.countDown();
            if (!waitForTransitioned.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError(
                  "Time ran out waiting for transition from elem array to token");
            }
            break;
          case TRANSITIONED_FROM_ELEMARRAY_TO_TOKEN:
            waitForTransitioned.countDown();
            break;
        }
      } catch (InterruptedException e) {
        throw new AssertionError("Interrupted while waiting for test to complete");
      }
    }
Test hook that waits for another thread to begin removing The current thread should then
continue to set the token then continue and convert to chs while holding the lock to the elem
array still After the conversion of chs, the lock is released and then remove can proceed
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/CompactRangeIndexJUnitTest.java