@Override
    public Optional<LockConfiguration> getLockConfiguration(Runnable task) {
        if (task instanceof ScheduledMethodRunnable scheduledMethodRunnable) {
            return getLockConfiguration(
                    scheduledMethodRunnable.getTarget(), scheduledMethodRunnable.getMethod(), new Object[] {});
        } else {
            logger.debug("Unknown task type " + task);
        }
        return Optional.empty();
    }
@Test
    public void shouldNotLockUnannotatedMethod() throws NoSuchMethodException {
        ScheduledMethodRunnable runnable = new ScheduledMethodRunnable(this, "methodWithoutAnnotation");
        Optional<LockConfiguration> lockConfiguration = extractor.getLockConfiguration(runnable);
        assertThat(lockConfiguration).isEmpty();
    }