'L{IRCClient.alterCollidedNick} determines how a nickname is altered upon
collision while a user is trying to change to that nickname.'

def test_overrideAlterCollidedNick(self):

    nick = 'foo'
    self.protocol.alterCollidedNick = (lambda nick: (nick + '***'))
    self.protocol.register(nick)
    self.protocol.irc_ERR_NICKNAMEINUSE('prefix', ['param'])
    lastLine = self.getLastLine(self.transport)
    self.assertEqual(lastLine, ('NICK    %s' % ((nick + '***'),)))
