class UserProvisioner {

    public Mono<Void> provisionUser(MailboxSession session) {
        if (session != null && !usersRepository.isReadOnly()) {
            return Mono.fromRunnable(() -> createAccountIfNeeded(session));
        }
        return Mono.empty();
    }

    @Inject @VisibleForTesting  UserProvisioner(UsersRepository usersRepository, MetricFactory metricFactory);

}