'Verify that when more than C{limit} events are logged to L{LogBeginner},
only the last C{limit} are replayed by L{LogBeginner.beginLoggingTo}.
@param limit: The maximum number of events the log beginner should
buffer.
@type limit: L{int}
@param beginner: The L{LogBeginner} against which to verify.
@type beginner: L{LogBeginner}
@raise: C{self.failureException} if the wrong events are replayed by
C{beginner}.
@return: L{None}'

def _bufferLimitTest(self, limit, beginner):

    for count in range((limit + 1)):
        self.publisher(dict(count=count))
    events = []
    beginner.beginLoggingTo([events.append])
    self.assertEqual(list(range(1, (limit + 1))), list((event['count'] for event in events)))
