'Test that _keySetup sets up the next encryption keys.'

def test_keySetup(self):

    self.proto.kexAlg = 'diffie-hellman-group14-sha1'
    self.proto.nextEncryptions = MockCipher()
    self.simulateKeyExchange('AB', 'CD')
    self.assertEqual(self.proto.sessionID, 'CD')
    self.simulateKeyExchange('AB', 'EF')
    self.assertEqual(self.proto.sessionID, 'CD')
    self.assertEqual(self.packets[(-1)], (transport.MSG_NEWKEYS, ''))
    newKeys = [self.proto._getKey(c, 'AB', 'EF') for c in iterbytes('ABCDEF')]
    self.assertEqual(self.proto.nextEncryptions.keys, (newKeys[1], newKeys[3], newKeys[0], newKeys[2], newKeys[5], newKeys[4]))
