'L{MultipleRangeStaticProducer.start} writes about
C{abstract.FileDescriptor.bufferSize} bytes of content from the
resource to the request at once.
To be specific about the \'about\' above: it can write slightly more,
for example in the case where the first boundary plus the first chunk
is less than C{bufferSize} but first boundary plus the first chunk
plus the second boundary is more, but this is unimportant as in
practice the boundaries are fairly small.  On the other side, it is
important for performance to bundle up several small chunks into one
call to request.write.'

def test_resumeProducingBuffersOutput(self):

    request = DummyRequest([])
    content = ('0123456789' * 2)
    producer = static.MultipleRangeStaticProducer(request, StringIO(content), [('a', 0, 2), ('b', 5, 10), ('c', 0, 0)])
    producer.bufferSize = 10
    producer.start()
    expected = [((('a' + content[0:2]) + 'b') + content[5:11]), (content[11:15] + 'c')]
    self.assertEqual(expected, request.written)
