@Test
  public void testIncrementReadBytes() throws IOException {
    File file = system.createTemporaryFile("file");
    final byte[] bytes = writeRandomBytes(file);
    file.getInputStream().read(bytes);
    ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class);
    verify(fileSystemStats, atLeast(1)).incReadBytes(captor.capture());
    final int actualByteCount = captor.getAllValues().stream().mapToInt(Integer::intValue).sum();
    assertEquals(bytes.length, actualByteCount);
  }
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