Circular buffer

An idea for an exercise.
Would appreciate feedback as to whether this is a useful exercise, how the tests could be improved, etc.