protected ImmutableSegment createTestImmutableSegment() {
    ImmutableSegment segment1 = SegmentFactory.instance().createImmutableSegment(this.comparator);
    final byte[] one = Bytes.toBytes(1);
    final byte[] two = Bytes.toBytes(2);
    final byte[] f = Bytes.toBytes(FAMILY);
    final byte[] q = Bytes.toBytes(COLUMN);
    final byte[] v = Bytes.toBytes(3);
    final KeyValue kv1 = new KeyValue(one, f, q, EnvironmentEdgeManager.currentTime(), v);
    final KeyValue kv2 = new KeyValue(two, f, q, EnvironmentEdgeManager.currentTime(), v);
    // the seqId of first cell less than Integer.MAX_VALUE,
    // the seqId of second cell greater than integer.MAX_VALUE
    kv1.setSequenceId(LESS_THAN_INTEGER_MAX_VALUE_SEQ_ID);
    kv2.setSequenceId(GREATER_THAN_INTEGER_MAX_VALUE_SEQ_ID);
    segment1.internalAdd(kv1, false, null, true);
    segment1.internalAdd(kv2, false, null, true);
    return segment1;
  }
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