'Check that the XMPP client sent the given stanza XML.
Extracts the next sent stanza and compares it with the given
XML using check.
Arguments:
stanza_class -- The class of the sent stanza object.
data         -- The XML string of the expected Message stanza,
or an equivalent stanza object.
use_values   -- Modifies the type of tests used by check_message.
defaults     -- A list of stanza interfaces that have defaults
values which may interfere with comparisons.
timeout      -- Time in seconds to wait for a stanza before
failing the check.
method       -- Select the type of comparison to use for
verifying the sent stanza. Options are \'exact\',
\'id\', \'stanzapath\', \'xpath\', and \'mask\'.
Defaults to the value of self.match_method.'

def send(self, data, defaults=None, use_values=True, timeout=0.5, method='exact'):

    sent = self.xmpp.socket.next_sent(timeout)
    if ((data is None) and (sent is None)):
        return
    if ((data is None) and (sent is not None)):
        self.fail(('Stanza    data    was    sent:    %s' % sent))
    if (sent is None):
        self.fail('No    stanza    was    sent.')
    xml = self.parse_xml(sent)
    self.fix_namespaces(xml, 'jabber:client')
    sent = self.xmpp._build_stanza(xml, 'jabber:client')
    self.check(sent, data, method=method, defaults=defaults, use_values=use_values)
