'The exception raised by C{datagramReceived} is logged with a message
identifying the offending protocol.'

def test_datagramReceivedExceptionIdentifiesProtocol(self):

    messages = []
    addObserver(messages.append)
    self.addCleanup(removeObserver, messages.append)
    self._datagramReceivedException()
    error = next((m for m in messages if m['isError']))
    message = textFromEventDict(error)
    self.assertEqual(('Unhandled    exception    from    %s.datagramReceived' % (fullyQualifiedName(self.protocol.__class__),)), message.splitlines()[0])
