* throw {@link GmailException}.
*/
@Test(expected = GmailException.class)
public void testMoveToGmailException() {
final ImapGmailClient client = new ImapGmailClient(ImapGmailLabel.SENT_MAIL);
final ImapGmailConnection connection = new ImapGmailConnection();
try {
connection.setLoginCredentials(conf.getGmailCredentials());
if (conf.useProxy()) {
connection.setProxy(conf.getProxyHost(), conf.getProxyPort());
connection.setProxyCredentials(conf.getProxyCredentials());
}
client.setConnection(connection);
log.debug("Starting to move message #1 to same " +
ImapGmailLabel.SENT_MAIL.getName());
client.moveTo(ImapGmailLabel.SENT_MAIL, 1);