@Test
  public void testDiskGetInvalidEntry() {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setDiskDirsAndSizes(diskDirs, diskDirSizes);
    diskRegionProperties.setRolling(false);
    diskRegionProperties.setMaxOplogSize(1000000000);
    diskRegionProperties.setBytesThreshold(1000000);
    diskRegionProperties.setTimeInterval(1500000);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory, 1_000_000_000);

    Region<Object, Object> region =
        createRegion(regionName, diskStoreName, false, false, false, true, 1000);

    byte[] value = new byte[1024];
    Arrays.fill(value, (byte) 77);
    for (int i = 0; i < 10; i++) {
      region.put("key" + i, value);
    }

    // invalidate an entry
    region.invalidate("key1");

    // get the invalid entry and verify that the value returned is null
    assertThat(region.get("key1")).isNull();

    region.close(); // closes disk file which will flush all buffers

  }
DiskRegGetInvalidEntryTest: get invalid entry should return null.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java