@Test
  public void testDiskRegionOverflow() {
    DiskRegionStats diskStats = diskRegion.getStats();
    EvictionCounters lruStats = getLRUStats(region);

    IntStream.range(0, MAX_ENTRIES + 1).forEach((i) -> region.put(i, "value"));

    assertEquals(1, diskStats.getWrites());
    assertEquals(0, diskStats.getReads());
    assertEquals(1, lruStats.getEvictions());
    assertEquals(1, diskStats.getNumOverflowOnDisk());
    assertEquals(MAX_ENTRIES, diskStats.getNumEntriesInVM());

    region.get(0);

    assertEquals(2, diskStats.getWrites());
    assertEquals(1, diskStats.getReads());
    assertEquals(2, lruStats.getEvictions());
  }
Tests that data overflows correctly to a disk region
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java