@Test
  public void testClearInteractionWithLRUList_Bug37605() throws Exception {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setOverflow(true);
    diskRegionProperties.setOverFlowCapacity(1);
    diskRegionProperties.setDiskDirs(diskDirs);
    diskRegionProperties.setRegionName(regionName);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory,
        diskRegionProperties.getMaxOplogSize());

    Region<String, String> region =
        createRegion(regionName, diskStoreName, true, true, false, true, 1);

    AtomicReference<Future<Void>> doClearFuture = new AtomicReference<>();
    region.getAttributesMutator().addCacheListener(new CacheListenerAdapter<String, String>() {
      @Override
      public void afterCreate(EntryEvent<String, String> event) {
        doClearFuture.set(executorServiceRule.runAsync(() -> {
          try {
            region.clear();
          } catch (AssertionError | Exception e) {
            errorCollector.addError(e);
          }
        }));
      }
    });

    region.create("key1", "value1");
    awaitFuture(doClearFuture);
    assertThat(region.isEmpty()).isTrue();

    VMLRURegionMap vmlruRegionMap = getVMLRURegionMap(region);
    assertThat(vmlruRegionMap.getEvictionList().getEvictableEntry()).isNull();
  }
Regression test for TRAC #37605: The entry which has already been removed from the system by
clear operation may still get appended to the LRUList

<p>
If an entry which has just been written on the disk, sees clear just before updating the
EvictionList, then that deleted entry should not go into the EvictionList
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java