'Testing adding multiple extended stanza addresses.'

def testAddAddresses(self):

    xmlstring = '\n                                        <message>\n                                                <addresses    xmlns="http://jabber.org/protocol/address">\n                                                        <address    jid="replyto@header1.org"    type="replyto"    desc="Reply    address"    />\n                                                        <address    jid="cc@header2.org"    type="cc"    />\n                                                        <address    jid="bcc@header2.org"    type="bcc"    />\n                                                </addresses>\n                                        </message>\n                                '
    msg = self.Message()
    msg['addresses'].setAddresses([{'type': 'replyto', 'jid': 'replyto@header1.org', 'desc': 'Reply    address'}, {'type': 'cc', 'jid': 'cc@header2.org'}, {'type': 'bcc', 'jid': 'bcc@header2.org'}])
    self.check(msg, xmlstring)
    msg = self.Message()
    msg['addresses']['replyto'] = [{'jid': 'replyto@header1.org', 'desc': 'Reply    address'}]
    msg['addresses']['cc'] = [{'jid': 'cc@header2.org'}]
    msg['addresses']['bcc'] = [{'jid': 'bcc@header2.org'}]
    self.check(msg, xmlstring)
