tests: add ringbuffer unittest