test_class.declarator: lockProvider = mock(LockProvider.class)
test_class.modifier: private final
test_class.original_string: private final LockProvider lockProvider = mock(LockProvider.class);
test_class.type: LockProvider
test_class.var_name: lockProvider
test_class.declarator: executor = new DefaultLockingTaskExecutor(lockProvider)
test_class.modifier: private final
test_class.original_string: private final DefaultLockingTaskExecutor executor = new DefaultLockingTaskExecutor(lockProvider);
test_class.type: DefaultLockingTaskExecutor
test_class.var_name: executor
test_class.declarator: lockConfig = new LockConfiguration(now(),"test", Duration.ofSeconds(100), Duration.ZERO)
test_class.modifier: private final
test_class.original_string: private final LockConfiguration lockConfig = new LockConfiguration(now(),"test", Duration.ofSeconds(100), Duration.ZERO);
test_class.type: LockConfiguration
test_class.var_name: lockConfig
test_class.file: shedlock-core/src/test/java/net/javacrumbs/shedlock/core/DefaultLockingTaskExecutorTest.java
test_class.identifier: DefaultLockingTaskExecutorTest
test_case.body: @Test
      void shouldExecuteWithResult() throws Throwable {
          when(lockProvider.lock(lockConfig))
              .thenReturn(Optional.of(mock(SimpleLock.class)));
  
          TaskResult<String> result = executor.executeWithLock(() -> "result", lockConfig);
          assertThat(result.wasExecuted()).isTrue();
          assertThat(result.getResult()).isEqualTo("result");
      }
test_case.class_method_signature: DefaultLockingTaskExecutorTest.shouldExecuteWithResult()
test_case.full_signature: @Test void shouldExecuteWithResult()
test_case.identifier: shouldExecuteWithResult
test_case.invocations: thenReturn when lock of mock executeWithLock isTrue assertThat wasExecuted isEqualTo assertThat getResult
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldExecuteWithResult()
focal_class.declarator: logger = LoggerFactory.getLogger(DefaultLockingTaskExecutor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(DefaultLockingTaskExecutor.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: lockProvider
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final LockProvider lockProvider;
focal_class.type: LockProvider
focal_class.var_name: lockProvider
focal_class.file: shedlock-core/src/main/java/net/javacrumbs/shedlock/core/DefaultLockingTaskExecutor.java
focal_class.identifier: DefaultLockingTaskExecutor
focal_class.interfaces: implements LockingTaskExecutor
focal_class.class_method_signature: DefaultLockingTaskExecutor.DefaultLockingTaskExecutor(@NonNull LockProvider lockProvider)
focal_class.full_signature: public  DefaultLockingTaskExecutor(@NonNull LockProvider lockProvider)
focal_class.identifier: DefaultLockingTaskExecutor
focal_class.modifiers: public
focal_class.parameters: (@NonNull LockProvider lockProvider)
focal_class.signature:  DefaultLockingTaskExecutor(@NonNull LockProvider lockProvider)
focal_class.class_method_signature: DefaultLockingTaskExecutor.executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_class.full_signature: @Override public void executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_class.identifier: executeWithLock
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_class.return: void
focal_class.signature: void executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_class.class_method_signature: DefaultLockingTaskExecutor.executeWithLock(@NonNull Task task, @NonNull LockConfiguration lockConfig)
focal_class.full_signature: @Override public void executeWithLock(@NonNull Task task, @NonNull LockConfiguration lockConfig)
focal_class.identifier: executeWithLock
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull Task task, @NonNull LockConfiguration lockConfig)
focal_class.return: void
focal_class.signature: void executeWithLock(@NonNull Task task, @NonNull LockConfiguration lockConfig)
focal_class.class_method_signature: DefaultLockingTaskExecutor.executeWithLock(@NonNull TaskWithResult<T> task, @NonNull LockConfiguration lockConfig)
focal_class.full_signature: @Override @NonNull public TaskResult<T> executeWithLock(@NonNull TaskWithResult<T> task, @NonNull LockConfiguration lockConfig)
focal_class.identifier: executeWithLock
focal_class.modifiers: @Override @NonNull public
focal_class.parameters: (@NonNull TaskWithResult<T> task, @NonNull LockConfiguration lockConfig)
focal_class.return: TaskResult<T>
focal_class.signature: TaskResult<T> executeWithLock(@NonNull TaskWithResult<T> task, @NonNull LockConfiguration lockConfig)
focal_method.body: @Override
      public void executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig) {
          try {
              executeWithLock((Task) task::run, lockConfig);
          } catch (RuntimeException | Error e) {
              throw e;
          } catch (Throwable throwable) {
              // Should not happen
              throw new IllegalStateException(throwable);
          }
      }
focal_method.class_method_signature: DefaultLockingTaskExecutor.executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_method.full_signature: @Override public void executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_method.identifier: executeWithLock
focal_method.invocations: executeWithLock
focal_method.modifiers: @Override public
focal_method.parameters: (@NonNull Runnable task, @NonNull LockConfiguration lockConfig)
focal_method.return: void
focal_method.signature: void executeWithLock(@NonNull Runnable task, @NonNull LockConfiguration lockConfig)