use of com.zimbra.cs.mailclient.imap.AppendResult in project zm-mailbox by Zimbra.
the class TestRemoteImapMultiServer method testAppend.
@Ignore("requires SELECT to work")
public void testAppend() throws Exception {
connection = connect(imapServer);
connection.login(PASS);
Assert.assertTrue("IMAP connection is not authenticated", connection.isAuthenticated());
assertTrue(connection.hasCapability("UIDPLUS"));
Flags flags = Flags.fromSpec("afs");
Date date = new Date(System.currentTimeMillis());
Literal msg = SharedImapTests.message(100000);
try {
AppendResult res = connection.append("INBOX", flags, date, msg);
assertNotNull(res);
byte[] b = fetchBody(res.getUid());
assertArrayEquals("content mismatch", msg.getBytes(), b);
} finally {
msg.dispose();
}
}
Aggregations