We shouldn't let secrets sit around in memory, as they could potentially be retrieved by an attacker, or left in memory during a core dump.
test-imap is a very simple tool which runs through some of the IMAP commands and makes sure they don't crash.