Renamed enumeration Types to MailType. Removed unused maxTriesUsed from MailStorageQueueThread. Moved most content of MailStorageQueueThread.run() to separate function processMail(). Improved names of two unit tests. Added a new unit test to increase code coverage.