protected void scheduleFlush(Executor executor) {
        if (scheduled.compareAndSet(false, true)) {
            executor.execute(() -> this.run(executor));
        }
    }
@Test
    public void testScheduleFlush() {
        AtomicBoolean scheduled = batchExecutorQueue.getScheduled();
        Assert.assertFalse(scheduled.get());

        batchExecutorQueue.scheduleFlush(mockExecutor);
        Assert.assertTrue(scheduled.get());

        // 验证是否有任务提交到 executor
        verify(mockExecutor).execute(any(Runnable.class));
    }