@Test
  public void testCleanFileSuccess() throws Exception {
    String filePath = tempDir.getAbsolutePath() + File.separator + "18_14_log";
    File file = new File(filePath);
    // Validate if pool has enough files
    assertFalse(file.exists());
    assertEquals(SEGMENT_COUNT, getReservePoolRemainingSegmentCount(STORE_ID, SEGMENT_CAPACITY));
    // Call allocateFile
    fileStore.allocateFile(filePath, STORE_ID);
    // Validate if file is created
    String targetFilePath = tempDir.getAbsolutePath() + File.separator + "18_0_log";
    File targetFile = new File(targetFilePath);
    assertTrue(targetFile.exists());
    assertEquals(SEGMENT_COUNT-1, getReservePoolRemainingSegmentCount(STORE_ID, SEGMENT_CAPACITY));
    // Clean File
    fileStore.cleanLogFile(targetFilePath, STORE_ID);
    // Validate if file is deleted
    assertFalse(file.exists());
    assertEquals(SEGMENT_COUNT, getReservePoolRemainingSegmentCount(STORE_ID, SEGMENT_CAPACITY));
  }
Tests the successful cleanup of a file using the cleanFile method.
Verifies that:
- The file is deleted successfully.
- The reserve pool count is updated correctly.
ambry-store/src/test/java/com/github/ambry/store/FileStoreTest.java