'A capability response consisting of atoms including C{\'=\'} should have
those atoms split on that byte and have capabilities in the same
category aggregated into lists in the resulting dictionary.
(n.b. - I made up the word "category atom"; the protocol has no notion
of structure here, but rather allows each capability to define the
semantics of its entry in the capability response in a freeform manner.
If I had realized this earlier, the API for capabilities would look
different.  As it is, we can hope that no one defines any crazy
semantics which are incompatible with this API, or try to figure out a
better API when someone does. -exarkun)'

def test_categoryAtoms(self):

    capabilitiesResult = self.protocol.getCapabilities(useCache=False)
    self.protocol.dataReceived('*    CAPABILITY    IMAP4rev1    AUTH=LOGIN    AUTH=PLAIN\r\n')
    self.protocol.dataReceived('0001    OK    Capability    completed.\r\n')
    def gotCapabilities(capabilities):
        self.assertEqual(capabilities, {'IMAP4rev1': None, 'AUTH': ['LOGIN', 'PLAIN']})
    capabilitiesResult.addCallback(gotCapabilities)
    return capabilitiesResult
