private void autoCloseLastLogSegmentAndCleanUpJournal() throws StoreException {
    CompactionPolicySwitchInfo compactionPolicySwitchInfo =
        new CompactionPolicySwitchInfo(System.currentTimeMillis(), true);
    backUpCompactionPolicyInfo(tokenTestDir.toString(), compactionPolicySwitchInfo);
    stateForTokenTest.index.log.autoCloseLastLogSegmentIfQualified();
    stateForTokenTest.index.journal.cleanUpJournal();
  }
Auto close last log segment and clean up journal.
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java