private IndexSegment createIndexSegmentFromFile(File file, boolean sealed, Journal journal) throws StoreException {
    return new IndexSegment(file, sealed, STORE_KEY_FACTORY, config, metrics, journal, time);
  }
Creates an {@link IndexSegment} from the given {@code file}.
@param file the {@link File} to use to build the {@link IndexSegment}.
@param sealed {@code true} if the segment needs to be sealed
@param journal the {@link Journal} to use.
@return an {@link IndexSegment} from the given {@code file}.
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/IndexSegmentTest.java