@Test public void mailboxFromMailboxIdShouldReturnPresentWhenExists() throws Exception { MailboxPath mailboxPath = MailboxPath.forUser(user, "myBox"); mailboxManager.createMailbox(mailboxPath, mailboxSession); MailboxId mailboxId = mailboxManager.getMailbox(mailboxPath, mailboxSession).getId(); Optional<Mailbox> mailbox = sut.builder() .id(mailboxId) .session(mailboxSession) .build(); assertThat(mailbox).isPresent(); assertThat(mailbox.get().getId()).isEqualTo(mailboxId); }
public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); MailboxBuilder builder(); }
MailboxFactory { public MailboxBuilder builder() { QuotaLoader defaultQuotaLoader = new DefaultQuotaLoader(quotaRootResolver, quotaManager); return new MailboxBuilder(this, defaultQuotaLoader); } @Inject  MailboxFactory(MailboxManager mailboxManager, QuotaManager quotaManager, QuotaRootResolver quotaRootResolver); MailboxBuilder builder();  }