'An L{amp.BinaryBoxProtocol} can receive serialized AMP boxes with
values of up to (2 ** 16 - 1) bytes.'

def test_receiveLongerBoxData(self):

    length = ((2 ** 16) - 1)
    value = ('x' * length)
    transport = StringTransport()
    protocol = amp.BinaryBoxProtocol(self)
    protocol.makeConnection(transport)
    protocol.dataReceived(amp.Box({'k': value}).serialize())
    self.assertEqual(self.boxes, [amp.Box({'k': value})])
    self.assertFalse(transport.disconnecting)
