'L{FileBodyProducer.startProducing} starts writing bytes from the input
file to the given L{IConsumer} and returns a L{Deferred} which fires
when they have all been written.'

def test_startProducing(self):

    expectedResult = 'hello,    world'
    readSize = 3
    output = BytesIO()
    consumer = FileConsumer(output)
    producer = FileBodyProducer(BytesIO(expectedResult), self.cooperator, readSize)
    complete = producer.startProducing(consumer)
    for i in range(((len(expectedResult) // readSize) + 1)):
        self._scheduled.pop(0)()
    self.assertEqual([], self._scheduled)
    self.assertEqual(expectedResult, output.getvalue())
    self.assertEqual(None, self.successResultOf(complete))
