'The L{IntNStringReceiver.recvd} buffer contains all data not yet
processed by L{IntNStringReceiver.dataReceived} if the
C{lengthLimitExceeded} event occurs.'

def test_recvdInLengthLimitExceeded(self):

    proto = self.getProtocol()
    DATA = 'too    long'
    proto.MAX_LENGTH = (len(DATA) - 1)
    message = self.makeMessage(proto, DATA)
    result = []
    def lengthLimitExceeded(length):
        result.append(length)
        result.append(proto.recvd)
    proto.lengthLimitExceeded = lengthLimitExceeded
    proto.dataReceived(message)
    self.assertEqual(result[0], len(DATA))
    self.assertEqual(result[1], message)
