@Test public void shouldScheduleAndSendEmailWithoutTemplateAndOffsetDateTime() throws Exception { final PriorityQueueEmailSchedulerService priorityQueueSchedulerService = scheduler(1); final Email email = getSimpleMail(); priorityQueueSchedulerService.schedule(email, 1); Thread.sleep(twoSecondsInMillis()); verify(emailService).send(email); }
@Override @Async public void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel) { scheduleEmail(mimeEmail, TimeUtils.offsetDateTimeNow(), desiredPriorityLevel); }
PriorityQueueEmailSchedulerService implements EmailSchedulerService { @Override @Async public void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel) { scheduleEmail(mimeEmail, TimeUtils.offsetDateTimeNow(), desiredPriorityLevel); } }
PriorityQueueEmailSchedulerService implements EmailSchedulerService { @Override @Async public void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel) { scheduleEmail(mimeEmail, TimeUtils.offsetDateTimeNow(), desiredPriorityLevel); } @Autowired  PriorityQueueEmailSchedulerService(
            final EmailService emailService,
            final EmailSchedulerProperties emailSchedulerProperties,
            final Optional<PersistenceService> persistenceServiceOptional,
            final EmailLogRenderer emailLogRenderer); }
PriorityQueueEmailSchedulerService implements EmailSchedulerService { @Override @Async public void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel) { scheduleEmail(mimeEmail, TimeUtils.offsetDateTimeNow(), desiredPriorityLevel); } @Autowired  PriorityQueueEmailSchedulerService(
            final EmailService emailService,
            final EmailSchedulerProperties emailSchedulerProperties,
            final Optional<PersistenceService> persistenceServiceOptional,
            final EmailLogRenderer emailLogRenderer); @Override @Async void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel); @Override @Async void schedule(@NonNull final Email mimeEmail, @NonNull final OffsetDateTime scheduledDateTime, final int desiredPriorityLevel); @Override @Async void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel, @NonNull final String template,
                         @NonNull final Map<String, Object> modelObject, final InlinePicture... inlinePictures); @Override @Async void schedule(@NonNull final Email mimeEmail, @NonNull final OffsetDateTime scheduledDateTime, final int desiredPriorityLevel,
                         @NonNull final String template, @NonNull final Map<String, Object> modelObject, final InlinePicture... inlinePictures); }
PriorityQueueEmailSchedulerService implements EmailSchedulerService { @Override @Async public void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel) { scheduleEmail(mimeEmail, TimeUtils.offsetDateTimeNow(), desiredPriorityLevel); } @Autowired  PriorityQueueEmailSchedulerService(
            final EmailService emailService,
            final EmailSchedulerProperties emailSchedulerProperties,
            final Optional<PersistenceService> persistenceServiceOptional,
            final EmailLogRenderer emailLogRenderer); @Override @Async void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel); @Override @Async void schedule(@NonNull final Email mimeEmail, @NonNull final OffsetDateTime scheduledDateTime, final int desiredPriorityLevel); @Override @Async void schedule(@NonNull final Email mimeEmail, final int desiredPriorityLevel, @NonNull final String template,
                         @NonNull final Map<String, Object> modelObject, final InlinePicture... inlinePictures); @Override @Async void schedule(@NonNull final Email mimeEmail, @NonNull final OffsetDateTime scheduledDateTime, final int desiredPriorityLevel,
                         @NonNull final String template, @NonNull final Map<String, Object> modelObject, final InlinePicture... inlinePictures);  }