Add tests for RingBuffer