@Test
  public void markInitializedThrowsCacheClosedExceptionWhenCacheIsClosing() {
    CancelCriterion cancelCriterion = markInitializedTestSetup();
    CacheClosedException cacheClosedException = new CacheClosedException("boom");
    doThrow(cacheClosedException).when(cancelCriterion).checkCancelInProgress();

    DiskInitFile diskInitFile =
        new DiskInitFile("testThrows", mockedDiskStoreImpl, false, Collections.emptySet());
    diskInitFile.close();

    assertThatThrownBy(() -> diskInitFile.markInitialized(mockDiskRegionView)).isEqualTo(
        cacheClosedException);
  }
Test the behavior of canonical ids in the init file.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskInitFileJUnitTest.java