@Test
    public void testFindAbstractFileByOffset() {
        writeDataToSecondFile();
        {
            // Test find first file by offset 0
            final AbstractFile firstFile = this.fileManager.findFileByOffset(30, false);
            assertEquals(firstFile.getFileFromOffset(), 0);
            // Test find second file by offset 136
            final AbstractFile secondFile = this.fileManager.findFileByOffset(this.indexFileSize + 10, false);
            assertEquals(secondFile.getFileFromOffset(), this.indexFileSize);
        }
    }
When call writeDataToFirstFile and writeDataToSecondFile
The fileManager's file state is :

fileId   fileFromOffset    firstLogIndex  lastLogIndex  fileLastOffset         wrotePosition
0        0                 0              9             26 + 100 =216          26 + 100
1        26 + 100          10             15            26 + 26 + 160 = 212    26 + 60
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/storage/file/FileManagerTest.java