add ringbuffer tests

testShouldNotTryPublishEventsWithArgsWhenBatchSizeIsNegative()
testShouldNotTryPublishEventsWithArgsWhenBatchStartsAtIsNegative()
remove duplicate logic in ringbuffer