'Test that the function which formats lines in response to a UIDL
command does so appropriately.'

def testUIDListLineFormatter(self):

    UIDs = ['abc', 'def', 'ghi']
    listLines = list(pop3.formatUIDListResponse([], UIDs.__getitem__))
    self.assertEqual(listLines, ['+OK    \r\n', '.\r\n'])
    listLines = list(pop3.formatUIDListResponse([123, 431, 591], UIDs.__getitem__))
    self.assertEqual(listLines, ['+OK    \r\n', '1    abc\r\n', '2    def\r\n', '3    ghi\r\n', '.\r\n'])
    listLines = list(pop3.formatUIDListResponse([0, None, 591], UIDs.__getitem__))
    self.assertEqual(listLines, ['+OK    \r\n', '1    abc\r\n', '3    ghi\r\n', '.\r\n'])
