Unit tests for IMAP utils.