Added integration tests for imap protocol