'Verify that a key that is too long will immediately raise a synchronous
exception.'

def test_keyTooLong(self):

    (c, s, p) = connectedServerAndClient()
    x = ('H' * (255 + 1))
    tl = self.assertRaises(amp.TooLong, c.callRemoteString, 'Hello', **{x: 'hi'})
    self.assertTrue(tl.isKey)
    self.assertTrue(tl.isLocal)
    self.assertIsNone(tl.keyName)
    self.assertEqual(tl.value, x.encode('ascii'))
    self.assertIn(str(len(x)), repr(tl))
    self.assertIn('key', repr(tl))
