@Test
  public void testGetFilesForGetAndScan() throws Exception {
    StripeStoreFileManager manager = createManager();
    verifyGetAndScanScenario(manager, null, null);
    verifyGetAndScanScenario(manager, KEY_B, KEY_C);

    // Populate one L0 file.
    MockHStoreFile sf0 = createFile();
    manager.insertNewFiles(al(sf0));
    verifyGetAndScanScenario(manager, null, null, sf0);
    verifyGetAndScanScenario(manager, null, KEY_C, sf0);
    verifyGetAndScanScenario(manager, KEY_B, null, sf0);
    verifyGetAndScanScenario(manager, KEY_B, KEY_C, sf0);

    // Populate a bunch of files for stripes, keep L0.
    MockHStoreFile sfA = createFile(OPEN_KEY, KEY_A);
    MockHStoreFile sfB = createFile(KEY_A, KEY_B);
    MockHStoreFile sfC = createFile(KEY_B, KEY_C);
    MockHStoreFile sfD = createFile(KEY_C, KEY_D);
    MockHStoreFile sfE = createFile(KEY_D, OPEN_KEY);
    manager.addCompactionResults(al(), al(sfA, sfB, sfC, sfD, sfE));

    verifyGetAndScanScenario(manager, null, null, sf0, sfA, sfB, sfC, sfD, sfE);
    verifyGetAndScanScenario(manager, keyAfter(KEY_A), null, sf0, sfB, sfC, sfD, sfE);
    verifyGetAndScanScenario(manager, null, keyAfter(KEY_C), sf0, sfA, sfB, sfC, sfD);
    verifyGetAndScanScenario(manager, KEY_B, null, sf0, sfC, sfD, sfE);
    verifyGetAndScanScenario(manager, null, KEY_C, sf0, sfA, sfB, sfC, sfD);
    verifyGetAndScanScenario(manager, KEY_B, keyAfter(KEY_B), sf0, sfC);
    verifyGetAndScanScenario(manager, keyAfter(KEY_A), KEY_B, sf0, sfB, sfC);
    verifyGetAndScanScenario(manager, KEY_D, KEY_D, sf0, sfE);
    verifyGetAndScanScenario(manager, keyAfter(KEY_B), keyAfter(KEY_C), sf0, sfC, sfD);
  }
Verifies scenario for finding a split point.
@param splitPointAfter    Stripe to expect the split point at/after.
@param shouldSplitStripe  If true, the split point is expected in the middle of the above
                          stripe; if false, should be at the end.
@param splitRatioToVerify Maximum split imbalance ratio.
@param sizes              Stripe sizes.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeStoreFileManager.java