private void AssertEvents(EventBean[] expected, RollingEventBuffer buffer)
 {
     for (int i = 0; i < expected.Length; i++)
     {
         Assert.AreSame(expected[i], buffer.Get(i));
     }
     TryInvalid(buffer, expected.Length);
 }
 private void TryInvalid(RollingEventBuffer buffer, int index)
 {
     try
     {
         buffer.Get(index);
         Assert.Fail();
     }
     catch (ArgumentException)
     {
         // expected
     }
 }
 public void SetUp()
 {
     _bufferOne  = new RollingEventBuffer(1);
     _bufferTwo  = new RollingEventBuffer(2);
     _bufferFive = new RollingEventBuffer(5);
 }