public void start() {
        if (isPeriodicMaterializeEnabled) {
            if (!started) {

                started = true;

                LOG.info("Task {} starts periodic materialization", subtaskName);

                scheduleNextMaterialization(initialDelay);
            }
        } else {
            LOG.info("Task {} disable periodic materialization", subtaskName);
        }
    }
@Test
    void testInitialDelay() {
        ManuallyTriggeredScheduledExecutorService scheduledExecutorService =
                new ManuallyTriggeredScheduledExecutorService();
        long periodicMaterializeDelay = 10_000L;

        try (PeriodicMaterializationManager test =
                new PeriodicMaterializationManager(
                        new SyncMailboxExecutor(),
                        newDirectExecutorService(),
                        "test",
                        (message, exception) -> {},
                        MaterializationTarget.NO_OP,
                        new ChangelogMaterializationMetricGroup(
                                UnregisteredMetricGroups.createUnregisteredOperatorMetricGroup()),
                        true,
                        periodicMaterializeDelay,
                        0,
                        "subtask-0",
                        scheduledExecutorService)) {
            test.start();

            assertThat(
                            getOnlyElement(
                                            scheduledExecutorService
                                                    .getAllScheduledTasks()
                                                    .iterator())
                                    .getDelay(MILLISECONDS))
                    .as(
                            String.format(
                                    "task for initial materialization should be scheduled with a 0..%d delay",
                                    periodicMaterializeDelay))
                    .isLessThanOrEqualTo(periodicMaterializeDelay);
        }
    }