@Override
    public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
        Map<String, String> mdcContextMap = getMdcContextMap();
        return super.schedule(ContextPropagator.decorateRunnable(contextPropagators, () -> {
                try {
                    setMDCContext(mdcContextMap);
                    command.run();
                } finally {
                    MDC.clear();
                }
            }), delay, unit);
    }
@Test
    public void testScheduleCallablePropagatesMDCContext() {
        MDC.put("key", "value");
        MDC.put("key2","value2");
        final Map<String, String> contextMap = MDC.getCopyOfContextMap();
        final ScheduledFuture<Map<String, String>> scheduledFuture = this.schedulerService
            .schedule(MDC::getCopyOfContextMap, 0, TimeUnit.MILLISECONDS);

        waitAtMost(1, TimeUnit.SECONDS).until(matches(() ->
            assertThat(scheduledFuture.get()).hasSize(2).containsExactlyEntriesOf(contextMap)));
    }