private static void runZebraDiscard(
      BuddyAllocator a, int baseSize, int pairCount, int allocs) {
    LlapAllocatorBuffer[] initial = prepareZebraFragmentedAllocator(a, baseSize, pairCount, true);
    int allocFraction = allocs * 2;
    int bigAllocSize = pairCount * 2 * baseSize / allocFraction;
    LlapAllocatorBuffer[] after = allocate(a, allocs, bigAllocSize, 1 + initial.length);
    LOG.info("After: " + a.testDump());
    for (int i = 0; i < pairCount; ++i) {
      int ix = (i << 1) + 1;
      checkTestValue(initial[ix], ix + 1, null, false);
    }
    checkTestValue(after[0], 1 + initial.length, null, true);
  }
This relies on allocations basically being sequential, no internal reordering. Rather,
the specific paths it takes do; all the scenarios should work regardless of allocation.
llap-server/src/test/org/apache/hadoop/hive/llap/cache/TestBuddyAllocatorForceEvict.java