### Question:
SafeLoggingExecutor implements Executor { @Override public void execute(Runnable command) { delegate.execute(new SafeLoggingRunnable(command)); } SafeLoggingExecutor(Executor delegate); @Override void execute(Runnable command);  }### Answer:
@Test public void execute_shouldNotCrashThread() { try { EXECUTOR.execute( () -> { throw new RuntimeException("Test exception"); }); } catch (Exception e) { fail("Expected exception to be caught but was not: " + e); } }