'L{imap4._formatHeaders} accepts a C{dict} of header name/value pairs and
returns a string representing those headers in the standard multiline,
C{":"}-separated format.'

def test_headerFormatter(self):

    cases = [({'Header1': 'Value1', 'Header2': 'Value2'}, 'Header2:    Value2\r\nHeader1:    Value1\r\n')]
    for (input, expected) in cases:
        output = imap4._formatHeaders(input)
        self.assertEqual(sorted(output.splitlines(True)), sorted(expected.splitlines(True)))
