public void when_overflowing_buffer_capacity_then_sends_only_buffer_capacity()
        {
            const int NumberOfEntries = 1200;

            sink.WaitHandle.Reset();

            for (int i = 0; i < NumberOfEntries; i++)
            {
                sink.OnNext(new CloudEventEntry(EventEntryTestHelper.Create(eventId: 10, payloadNames: new string[] { "arg" }, payload: new object[] { i })));
            }

            sink.WaitHandle.Set();

            Assert.IsTrue(sink.FlushAsync().Wait(TimeSpan.FromSeconds(10)));

            Assert.AreEqual(BufferSize, sink.SentEntriesCount);
        }