@Override
    public void executeWithLock(Runnable task) {
        Optional<LockConfiguration> lockConfigOptional = lockConfigurationExtractor.getLockConfiguration(task);
        if (lockConfigOptional.isEmpty()) {
            logger.debug("No lock configuration for {}. Executing without lock.", task);
            task.run();
        } else {
            lockingTaskExecutor.executeWithLock(task, lockConfigOptional.get());
        }
    }
@Test
    void noConfigNoLock() {
        when(lockConfigurationExtractor.getLockConfiguration(task)).thenReturn(Optional.empty());

        defaultLockManager.executeWithLock(task);
        verify(task).run();
        verifyNoInteractions(lockProvider);
    }