@Test
  public void testExport() throws IOException {
    String name1 = "testFile1";
    File file1 = system.createFile(name1);
    byte[] file1Data = writeRandomBytes(file1);

    String name2 = "testFile2";
    File file2 = system.createFile(name2);
    byte[] file2Data = writeRandomBytes(file2);

    java.io.File parentDir = tempFolderRule.getRoot();
    system.export(parentDir);
    String[] foundFiles = parentDir.list();
    Arrays.sort(foundFiles);
    assertArrayEquals(new String[] {"testFile1", "testFile2"}, foundFiles);

    assertExportedFileContents(file1Data, new java.io.File(parentDir, "testFile1"));
    assertExportedFileContents(file2Data, new java.io.File(parentDir, "testFile2"));
  }
Test what happens a file rename is aborted in the middle due to the a cache closed exception.
The next member that uses those files should be able to clean up after the partial rename.
geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystemJUnitTest.java