@Before
  public void setup() throws IOException {
    Configuration conf = new Configuration();
    HBaseTestingUtil hbaseUtility = new HBaseTestingUtil(conf);
    TableDescriptorBuilder tableDescriptorBuilder =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(TABLE));
    ColumnFamilyDescriptor columnFamilyDescriptor =
      ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(FAMILY)).build();
    tableDescriptorBuilder.setColumnFamily(columnFamilyDescriptor);

    RegionInfo info = RegionInfoBuilder.newBuilder(TableName.valueOf(TABLE)).build();
    Path rootPath = hbaseUtility.getDataTestDir(ROOT_SUB_PATH);
    this.region =
      HBaseTestingUtil.createRegionAndWAL(info, rootPath, conf, tableDescriptorBuilder.build());
    this.store = region.getStore(columnFamilyDescriptor.getName());
    this.comparator = CellComparator.getInstance();
    this.compactionKVMax = HConstants.COMPACTION_KV_MAX_DEFAULT;
  }
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