@Test
  public void getLogSegmentsNotInJournalTest() throws IOException, StoreException {
    if (isLogSegmented) {
      testGetLogSegmentsNotInJournal(2, 2 * state.getMaxInMemElements());
      testGetLogSegmentsNotInJournal(3, 2 * state.getMaxInMemElements());
    } else {
      assertNull("LogSegments mismatch for non segmented log ", state.index.getLogSegmentsNotInJournal());
    }
    state.closeAndClearIndex();
    state.reloadIndex(false, false);
    assertNull("There should be no offsets in the journal", state.index.journal.getFirstOffset());
    assertNull("There should be no log segments returned", state.index.getLogSegmentsNotInJournal());
  }
Tests {@link PersistentIndex#getLogSegmentsNotInJournal()}
@throws StoreException
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java