@Test
  public void closeDiskStoreDuringUpdate() throws InterruptedException {
    testRegion.put("existingKey", "value");
    testRegion.getAttributesMutator().setCacheWriter(blockingWriter);
    Future<Void> asyncUpdate =
        CompletableFuture.runAsync(() -> testRegion.put("existingKey", "newValue"));
    blockingWriter.awaitUpdateInProgress();
    cache.closeDiskStores();
    blockingWriter.allowUpdates();
    assertThatThrownBy(asyncUpdate::get).hasRootCauseInstanceOf(CacheClosedException.class)
        .hasMessageContaining("The disk store is closed");
  }
Tests the basic use cases for PR persistence.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/PersistPRKRFIntegrationTest.java