public void exceedsMaximumBufferSize_onRead(ConcurrentLinkedDictionary <int, int> map) { PaddedAtomicLong drainCounter = map.readBufferDrainAtWriteCount[ConcurrentLinkedDictionary <int, int> .readBufferIndex()]; map.readBufferWriteCount[ConcurrentLinkedDictionary <int, int> .readBufferIndex()].SetValue(ConcurrentLinkedDictionary <int, int> .READ_BUFFER_THRESHOLD - 1); map.afterRead(null); Assert.That(drainCounter.GetValue(), Is.EqualTo(0L)); map.afterRead(null); Assert.That(drainCounter.GetValue(), Is.EqualTo(ConcurrentLinkedDictionary <int, int> .READ_BUFFER_THRESHOLD + 1L)); }