@Test
  public void testBug41770() throws Exception {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setRegionName(regionName);
    diskRegionProperties.setOverflow(false);
    diskRegionProperties.setRolling(false);
    diskRegionProperties.setDiskDirs(diskDirs);
    diskRegionProperties.setPersistBackup(true);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory);

    Region<String, String> region =
        createRegion(regionName, diskStoreName, true, false, false, false, 0);

    // Install a listener then gets called when the async flusher threads finds an entry to flush
    LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;
    DoRegionClearDuringDiskStoreFlush doRegionClearDuringDiskStoreFlush =
        new DoRegionClearDuringDiskStoreFlush(region);
    CacheObserverHolder.setInstance(doRegionClearDuringDiskStoreFlush);

    region.create("KEY", "VALUE1");
    getDiskStore(region).forceFlush();

    doRegionClearDuringDiskStoreFlush.waitForCompletion();
    // we should now have two creates in our oplog.

    region.close();

    // do a recovery it will fail with an assertion if this bug is not fixed
    Throwable thrown =
        catchThrowable(() -> createRegion(regionName, diskStoreName, true, false, false, false, 0));
    assertThat(thrown).isNull();
  }
Regression test for TRAC #41770: ConcurrentRegionOperationsJUnitTest fails with duplicate
create in an oplog
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java