@Test
public void testForget() {

    LiveList<Integer> source = new LiveArrayList<>(0, 1, 2, 3, 4, 5, 6);
    MemoizationList<Integer> memoizing = source.memoize();
    LiveList<Integer> memoized = memoizing.memoizedItems();
    memoizing.pin(); // otherwise no memoization takes place
    memoizing.force(0, 7);
    assertEquals(7, memoized.size());
    memoizing.forget(2, 4);
    assertEquals(5, memoized.size());
    memoizing.forget(3, 5);
    assertEquals(4, memoized.size());
    Counter counter = new Counter();
    memoized.observeQuasiChanges(ch -> {
        counter.inc();
        assertEquals(1, ch.getModificationCount());
        QuasiListModification<?> mod = ch.getModifications().get(0);
        assertEquals(1, mod.getFrom());
        assertEquals(Arrays.asList(1, 5), mod.getRemoved());
        assertEquals(0, mod.getAddedSize());
    });
    memoizing.forget(1, 6);
    assertEquals(1, counter.get());
}