Adds tests for imap