@Test
  public void testEvictValueOnRegionWithEvictionAttributes() {
    region = cache.<Integer, String>createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
        .setDiskSynchronous(true)
        .setDiskStoreName(diskStore.getName()).setEvictionAttributes(EvictionAttributes
            .createLRUEntryAttributes(MAX_ENTRIES, EvictionAction.OVERFLOW_TO_DISK))
        .create(REGION_NAME + 2);
    diskRegion = ((InternalRegion) region).getDiskRegion();

    IntStream.range(0, MAX_ENTRIES + 1).forEach((i) -> region.put(i, "value"));
    assertThatThrownBy(() -> ((LocalRegion) region).evictValue(3))
        .isInstanceOf(IllegalStateException.class);
  }
Tests calling region.evictValue() on region with eviction-attribute set.
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java