Don't write so complicated unit tests. You can test the same code much, much more simpler. Try to avoid any loops, unnecessary variables, big numbers, etc.

```
SpeedLimitQueue queue(10);
ASSERT_EQ({}, queue.pop(seconds(0)));
queue.push(1, SpeedLimitQueue::kRead, 4);
queue.push(2, SpeedLimitQueue::kRead, 4);
queue.push(3, SpeedLimitQueue::kRead, 4);
queue.push(4, SpeedLimitQueue::kRead, 4);
ASSERT_EQ({1, 2}, queue.pop(seconds(0)));
ASSERT_EQ({3, 4}, queue.pop(seconds(1)));
```