@Test
  public void testShouldFlush() throws Exception {
    Configuration conf = new Configuration();
    conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 1000);
    checkShouldFlush(conf, true);
    // test disable flush
    conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 0);
    checkShouldFlush(conf, false);
  }
Tests the HRegion.shouldFlush method - adds an edit in the memstore and checks that shouldFlush
returns true, and another where it disables the periodic flush functionality and tests whether
shouldFlush returns false.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java