private void createMailbox(MailboxSession mailboxSession, MailboxPath mailboxPath) throws MailboxException, UnsupportedEncodingException {
getMockMailboxManager().startProcessingRequest(mailboxSession);
getMockMailboxManager().createMailbox(mailboxPath, mailboxSession);
MessageManager messageManager = getMockMailboxManager().getMailbox(mailboxPath, mailboxSession);
for (int j=0; j < MESSAGE_PER_MAILBOX_COUNT; j++) {
messageManager.appendMessage(new ByteArrayInputStream(MockMail.MAIL_TEXT_PLAIN.getBytes("UTF-8")),
Calendar.getInstance().getTime(),
mailboxSession,
true,
new Flags(Flags.Flag.RECENT));
}