private long testFlushWithThroughputLimit() throws Exception {
    final long throughputLimit = 1024 * 1024;
    setMaxMinThroughputs(throughputLimit, throughputLimit);
    Configuration conf = hbtu.getConfiguration();
    conf.setLong(
      PressureAwareFlushThroughputController.HBASE_HSTORE_FLUSH_THROUGHPUT_CONTROL_CHECK_INTERVAL,
      throughputLimit);
    hbtu.startMiniCluster(1);
    Table table = hbtu.createTable(tableName, family);
    Pair<Double, Long> result = generateAndFlushData(table);
    hbtu.deleteTable(tableName);
    LOG.debug("Throughput is: " + (result.getFirst() / 1024 / 1024) + " MB/s");
    // confirm that the speed limit work properly(not too fast, and also not too slow)
    // 20% is the max acceptable error rate.
    assertTrue(result.getFirst() < throughputLimit * 1.2);
    assertTrue(result.getFirst() > throughputLimit * 0.8);
    return result.getSecond();
  }
Writes Puts to the table and flushes few times.
@return {@link Pair} of (throughput, duration).
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java