public int getNumberOfPendingCheckpoints() {
        synchronized (lock) {
            return this.pendingCheckpoints.size();
        }
    }
@Test
    void testPeriodicSchedulingWithInactiveTasks() throws Exception {
        CheckpointCoordinator checkpointCoordinator =
                setupCheckpointCoordinatorWithInactiveTasks(new MemoryStateBackend());

        // the coordinator should start checkpointing now
        manuallyTriggeredScheduledExecutor.triggerNonPeriodicScheduledTasks(
                CheckpointCoordinator.ScheduledTrigger.class);
        manuallyTriggeredScheduledExecutor.triggerAll();

        assertThat(checkpointCoordinator.getNumberOfPendingCheckpoints()).isGreaterThan(0);
    }