private void verifyCompaction(StripeCompactionPolicy policy, StripeInformationProvider si,
    Collection<HStoreFile> sfs, Boolean dropDeletes, Integer count, Long size, byte[] start,
    byte[] end, boolean needsCompaction) throws IOException {
    StripeCompactor sc = mock(StripeCompactor.class);
    assertTrue(!needsCompaction || policy.needsCompactions(si, al()));
    StripeCompactionPolicy.StripeCompactionRequest scr = policy.selectCompaction(si, al(), false);
    verifyCollectionsEqual(sfs, scr.getRequest().getFiles());
    scr.execute(sc, NoLimitThroughputController.INSTANCE, null);
    verify(sc, times(1)).compact(eq(scr.getRequest()),
      count == null ? anyInt() : eq(count.intValue()),
      size == null ? anyLong() : eq(size.longValue()), aryEq(start), aryEq(end),
      dropDeletesMatcher(dropDeletes, start), dropDeletesMatcher(dropDeletes, end), any(), any());
  }
Verify arbitrary compaction.
@param policy      Policy to test.
@param si          Stripe information pre-set with stripes to test.
@param sfs         Files that should be compacted.
@param dropDeletes Whether to drop deletes from compaction range.
@param count       Expected # of resulting stripes, null if not checked.
@param size        Expected target stripe size, null if not checked.
@param start       Left boundary of the compaction.
@param end         Right boundary of the compaction.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java