protected void unregisterAllTimeouts() {
        for (Timeout<K> timeout : timeouts.values()) {
            timeout.cancel();
        }
        timeouts.clear();
    }
@Test
    void testUnregisterAllTimeouts() {
        final ManuallyTriggeredScheduledExecutorService scheduledExecutorService =
                new ManuallyTriggeredScheduledExecutorService();
        DefaultTimerService<AllocationID> timerService =
                new DefaultTimerService<>(scheduledExecutorService, 100L);
        timerService.start((ignoredA, ignoredB) -> {});

        timerService.registerTimeout(new AllocationID(), 10, TimeUnit.SECONDS);
        timerService.registerTimeout(new AllocationID(), 10, TimeUnit.SECONDS);

        timerService.unregisterAllTimeouts();

        Map<?, ?> timeouts = timerService.getTimeouts();
        assertThat(timeouts).isEmpty();

        for (ScheduledFuture<?> scheduledTask : scheduledExecutorService.getAllScheduledTasks()) {
            assertThat(scheduledTask.isCancelled()).isTrue();
        }
    }