@Test public void createMailboxesIfNeededShouldSubscribeMailboxes() throws Exception { testee.createMailboxesIfNeeded(session).block(); assertThat(subscriptionManager.subscriptions(session)) .containsOnlyElementsOf(DefaultMailboxes.DEFAULT_MAILBOXES); }
Mono<Void> createMailboxesIfNeeded(MailboxSession session) { return metricFactory.decorateSupplierWithTimerMetric("JMAP-mailboxes-provisioning", () -> { Username username = session.getUser(); return createDefaultMailboxes(username); }); }
DefaultMailboxesProvisioner { Mono<Void> createMailboxesIfNeeded(MailboxSession session) { return metricFactory.decorateSupplierWithTimerMetric("JMAP-mailboxes-provisioning", () -> { Username username = session.getUser(); return createDefaultMailboxes(username); }); } }
DefaultMailboxesProvisioner { Mono<Void> createMailboxesIfNeeded(MailboxSession session) { return metricFactory.decorateSupplierWithTimerMetric("JMAP-mailboxes-provisioning", () -> { Username username = session.getUser(); return createDefaultMailboxes(username); }); } @Inject @VisibleForTesting  DefaultMailboxesProvisioner(MailboxManager mailboxManager,
                                SubscriptionManager subscriptionManager,
                                MetricFactory metricFactory); }
DefaultMailboxesProvisioner { Mono<Void> createMailboxesIfNeeded(MailboxSession session) { return metricFactory.decorateSupplierWithTimerMetric("JMAP-mailboxes-provisioning", () -> { Username username = session.getUser(); return createDefaultMailboxes(username); }); } @Inject @VisibleForTesting  DefaultMailboxesProvisioner(MailboxManager mailboxManager,
                                SubscriptionManager subscriptionManager,
                                MetricFactory metricFactory);  }
DefaultMailboxesProvisioner { Mono<Void> createMailboxesIfNeeded(MailboxSession session) { return metricFactory.decorateSupplierWithTimerMetric("JMAP-mailboxes-provisioning", () -> { Username username = session.getUser(); return createDefaultMailboxes(username); }); } @Inject @VisibleForTesting  DefaultMailboxesProvisioner(MailboxManager mailboxManager,
                                SubscriptionManager subscriptionManager,
                                MetricFactory metricFactory);   }