@Override
    public void executeWithLock(Runnable task, LockConfiguration lockConfig) {
        try {
            executeWithLock((Task) task::run, lockConfig);
        } catch (RuntimeException | Error e) {
            throw e;
        } catch (Throwable throwable) {
            // Should not happen
            throw new IllegalStateException(throwable);
        }
    }
@Test
    void lockShouldBeReentrantForMultipleDifferentLocks() {
        mockLockFor(lockConfig);
        mockLockFor(lockConfig2);

        AtomicBoolean called = new AtomicBoolean(false);

        executor.executeWithLock(
                (Runnable) () -> executor.executeWithLock((Runnable) () -> called.set(true), lockConfig2), lockConfig);

        assertThat(called.get()).isTrue();
    }