### Question:
ProcessingMessageScheduler extends MessageScheduler { @Override protected long getNextScheduleTime(String queueName, Long value) { long currentTime = System.currentTimeMillis(); if (value == null) { long delay = queueNameToDelay.get(queueName); return currentTime + delay; } return max(currentTime, value); }    }### Answer:
@Test public void getNextScheduleTimeSlowQueue() { long currentTime = System.currentTimeMillis(); assertThat( messageScheduler.getNextScheduleTime(slowQueue, null), greaterThanOrEqualTo(currentTime + 100000)); assertEquals( currentTime + 1000L, messageScheduler.getNextScheduleTime(slowQueue, currentTime + 1000L)); }
@Test public void getNextScheduleTimeFastQueue() { long currentTime = System.currentTimeMillis(); assertThat( messageScheduler.getNextScheduleTime(fastQueue, null), greaterThanOrEqualTo(currentTime + 200000)); assertEquals( currentTime + 1000L, messageScheduler.getNextScheduleTime(fastQueue, currentTime + 1000L)); }