log.debug("Starting to move message(s) to trash folder.");
// moving single GmailMessage to trash folder
//GmailMessage[] jmgms = new JavaMailGmailMessage[1];
//jmgms[0] = messages.get(0);
//client.moveToTrash(jmgms);
client.moveToTrash(messages.toArray(new JavaMailGmailMessage[0]));
log.debug("Finished moving all selected message(s) to trash.");
assertTrue("All unread messages are moved to trash.",
client.getUnreadMessages().isEmpty());
} catch (final Exception e) {
log.error("Test Failed", e);