'Test if wrapper writes all data to wrapped protocol after parsing.'

def test_overflowBytesSentToWrappedProtocolAfter(self):

    factory = HAProxyWrappingFactory(Factory.forProtocol(StaticProtocol))
    proto = factory.buildProtocol(address.IPv6Address('TCP', '::1', 8080))
    transport = StringTransportWithDisconnection()
    proto.makeConnection(transport)
    proto.dataReceived('PROXY    TCP6    ::1    ::2    ')
    proto.dataReceived('8080    8888\r\nHTTP/1.1    /    GET')
    proto.dataReceived('\r\n\r\n')
    self.assertEqual(proto.wrappedProtocol.data, 'HTTP/1.1    /    GET\r\n\r\n')
