@Test
    public void testIntermixedInsertionsAndRemovals() {
        for (int count : INTERMIXED_SERIES.get().toArray()) {
            TestScenarioBuilder sb = new TestScenarioBuilder();
            int presented = Math.max(25, count / 3);
            int dynamic = (count - presented);
            OffsetGeneratorParameters offsetParams = OffsetGeneratorParameters.makeExclusiveAndExact(5, presented - 5, dynamic, 3);

            sb.appendInsertions(sb.makeEntriesGeneratorRandom(presented, 1, 4000));
            sb.append(makeProportionalSeries(
                StreamSupplier.of(
                    sb.makeInsertions(sb.makeEntriesGeneratorRandom(dynamic, 1, 4000)),
                    sb.makeRemovalsRandom(0, presented, presented),
                    sb.makeCheckIteratorAtRandomOffset(offsetParams, true),
                    sb.makeCheckIteratorAtRandomOffset(offsetParams, false)
                ),
                // 6 iterations for 4 sets of operations, each turn for 1/6 of dynamically introduced entries
                () -> IntStream.range(0, 6 * 4).mapToDouble(n -> 100 / 6.0)
            ));
        }
    }
Test scenarios to cover OffsetKeyedTreeMap data structure

orderings (M)
 - ascending
 - descending
 - random
<p>
modification scenarios (P)
 - all insertions (n)
 - all insertions, then all remove (different series proportions n,m)
 - intermixed insertions and remove (different series proportions n,m)
 - all insertions, then apply offset at existing key
 - all insertions, then apply offset at missing key
 - intermixed insertions, remove, apply offset (different series proportions n,m,p)
 - all insertions, then removeAtRange at existing key
 - all insertions, then removeAtRange offset at missing key
 - intermixed insertions, removeAtRange, apply offset (different series proportions n,m,p)
<p>
inspection scenarios (Q)
 - find existing key
 - find missing key
 - find existing key and iterate forward/backward till the end/head
 - find missing key and iterate forward/backward till the end/head
 - random backward-forward iterations
<p>
test/org.jkiss.dbeaver.model.lsm.test/src/org/jkiss/dbeaver/model/lsm/test/OffsetKeyedTreeMapTest.java