private void runSimple1to2Discard(BuddyAllocator a, int baseSize) {
    // Allocate 1-1-1-1; free 0&2; allocate 2
    LlapAllocatorBuffer[] initial = prepareSimpleFragmentedAllocator(a, baseSize, true);
    LlapAllocatorBuffer[] after = allocate(a, 1, baseSize * 2, 1 + initial.length);
    LOG.info("After: " + a.testDump());
    checkInitialValues(initial, 0, 2);
    checkTestValue(after[0], 1 + initial.length, null, true);
    a.deallocate(initial[0]);
    a.deallocate(initial[2]);
    a.deallocate(after[0]);
  }
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