@Test
  public void testMemStoreCompactorSegmentsIteratorNext() throws IOException {
    List<ImmutableSegment> segments = Arrays.asList(createTestImmutableSegment());
    MemStoreCompactorSegmentsIterator iterator = new MemStoreCompactorSegmentsIterator(segments,
      this.comparator, this.compactionKVMax, this.store);
    verifyNext(iterator);
    closeTestSegments(segments);
  }
Test the {@link MemStoreCompactorSegmentsIterator} and {@link MemStoreMergerSegmentsIterator}
class, Test for bug : HBASE-22324
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java