public static LlapAllocatorBuffer[] prepareSimpleFragmentedAllocator(
      BuddyAllocator a, int baseSize, boolean doIncRef) {
    LlapAllocatorBuffer[] initial = allocate(a, 4, baseSize, 1, doIncRef);
    checkInitialValues(initial, 0, 2);
    a.deallocate(initial[1]);
    a.deallocate(initial[3]);
    LOG.info("Before: " + a.testDump());
    a.setOomLoggingForTest(true);
    return initial;
  }
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