'L{Request.writeTo} formats header data and writes it to the given
transport.'

def test_sendRequestHeaders(self):

    headers = Headers({'x-foo': ['bar', 'baz'], 'host': ['example.com']})
    Request('GET', '/foo', headers, None).writeTo(self.transport)
    lines = self.transport.value().split('\r\n')
    self.assertEqual(lines[0], 'GET    /foo    HTTP/1.1')
    self.assertEqual(lines[(-2):], ['', ''])
    del lines[0], lines[(-2):]
    lines.sort()
    self.assertEqual(lines, ['Connection:    close', 'Host:    example.com', 'X-Foo:    bar', 'X-Foo:    baz'])
