void compactEquals(List<HStoreFile> candidates, boolean forcemajor, boolean isOffPeak,
    long... expected) throws IOException {
    store.forceMajor = forcemajor;
    // Test Default compactions
    CompactionRequestImpl result =
      ((RatioBasedCompactionPolicy) store.storeEngine.getCompactionPolicy())
        .selectCompaction(candidates, new ArrayList<>(), false, isOffPeak, forcemajor);
    List<HStoreFile> actual = new ArrayList<>(result.getFiles());
    if (isOffPeak && !forcemajor) {
      Assert.assertTrue(result.isOffPeak());
    }
    Assert.assertEquals(Arrays.toString(expected), Arrays.toString(getSizes(actual)));
    store.forceMajor = false;
  }
Setting up a Store
@throws IOException with error
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java