// not screw up (IndexOutOfBoundsException)
int overflow = 7;
// Note that count == result.getNextSequenceNumber() always yield true at this point (see assertion above),
// so we actually overflew the buffer by a quantity q == count + overflow (see assertion below).
long overflowCount = (bufferCapacity - count) + result.getNextSequenceNumber() + overflow;
for (int i = 0; i < overflowCount; ++i) listener.handleNotification(notification, listenerID);
result = handler.fetchNotifications(result.getNextSequenceNumber(), bufferCapacity + 1, 100);
// After algebraic semplification, overflowCount == bufferCapacity + overflow, so
// the buffer is full, and we fetched all notifications
assertEquals(count + overflow, result.getEarliestSequenceNumber());