@Test
public void testTwoBufferedSpliteratorsConsumedInterchangeably() {

    SeqBuffer<Integer> buffer = buffer();
    // consume some x, then some y, then again some x, etc.
    Spliterator<Integer> x = buffer.seq().spliterator(); // call 1: buffering spliterator
    assertTrue(x.tryAdvance(i -> verifyInt(1, i)));
    assertTrue(x.tryAdvance(i -> verifyInt(2, i)));
    Spliterator<Integer> y = buffer.seq().spliterator(); // call 2: buffering spliterator
    assertTrue(y.tryAdvance(i -> verifyInt(1, i)));
    assertTrue(x.tryAdvance(i -> verifyInt(3, i)));
    assertTrue(y.tryAdvance(i -> verifyInt(2, i)));
    assertTrue(y.tryAdvance(i -> verifyInt(3, i)));
    assertTrue(y.tryAdvance(i -> verifyInt(4, i)));
    assertTrue(x.tryAdvance(i -> verifyInt(4, i)));
    assertTrue(x.tryAdvance(i -> verifyInt(5, i)));
    assertTrue(y.tryAdvance(i -> verifyInt(5, i)));
    assertFalse(x.tryAdvance(AssertionError::new));
    assertFalse(y.tryAdvance(AssertionError::new));
    assertEquals(list, buffer.seq().toList()); // call 3: buffered spliterator + complete consumption
}