@Test
    public void testTruncateSuffix() {
        // Current flush position = 212
        testFlush();
        // Test truncate to logIndex = 10 , that means update flush position to 126 + 26 + 10 = 162
        this.fileManager.truncateSuffix(10, 0);
        assertEquals(this.fileManager.getFlushedPosition(), 162);
        assertEquals(this.fileManager.getLastLogIndex(), 10);
    }
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