'Build a request pointing at C{uri}, and check that a proxied request
is created, pointing a C{expectedURI}.'

def _testProcess(self, uri, expectedURI, method='GET', data=''):

    transport = StringTransportWithDisconnection()
    channel = DummyChannel(transport)
    reactor = MemoryReactor()
    request = ProxyRequest(channel, False, reactor)
    request.gotLength(len(data))
    request.handleContentChunk(data)
    request.requestReceived(method, ('http://example.com' + uri), 'HTTP/1.0')
    self.assertEqual(len(reactor.tcpClients), 1)
    self.assertEqual(reactor.tcpClients[0][0], u'example.com')
    self.assertEqual(reactor.tcpClients[0][1], 80)
    factory = reactor.tcpClients[0][2]
    self.assertIsInstance(factory, ProxyClientFactory)
    self.assertEqual(factory.command, method)
    self.assertEqual(factory.version, 'HTTP/1.0')
    self.assertEqual(factory.headers, {'host': 'example.com'})
    self.assertEqual(factory.data, data)
    self.assertEqual(factory.rest, expectedURI)
    self.assertEqual(factory.father, request)
