Implement ImapFolderAgent.
Define expected payloads and reuse them.
Include "folder" in events.
Cover the "mark_as_read" option.
Check regexp validation.
Convert 'port' to integer.