'If the I{start_response} callable is invoked multiple times before a
data for the response body is produced, the values from the last call
are used.'

def test_multipleStartResponse(self):

    channel = DummyChannel()
    def applicationFactory():
        def application(environ, startResponse):
            startResponse('100    Foo', [])
            startResponse('200    Bar', [])
            return iter(())
        return application
    (d, requestFactory) = self.requestFactoryFactory()
    def cbRendered(ignored):
        self.assertTrue(channel.transport.written.getvalue().startswith('HTTP/1.1    200    Bar\r\n'))
    d.addCallback(cbRendered)
    self.lowLevelRender(requestFactory, applicationFactory, (lambda : channel), 'GET', '1.1', [], [''], None, [])
    return d
