'L{amp.BinaryBoxProtocol.unhandledError} logs the failure passed to it
and disconnects its transport.'

def test_unhandledErrorWithTransport(self):

    transport = StringTransport()
    protocol = amp.BinaryBoxProtocol(self)
    protocol.makeConnection(transport)
    protocol.unhandledError(Failure(RuntimeError('Fake    error')))
    self.assertEqual(1, len(self.flushLoggedErrors(RuntimeError)))
    self.assertTrue(transport.disconnecting)
