public static Runnable withContextClassLoader(
            Runnable runnable, ClassLoader contextClassLoader) {
        return () -> runWithContextClassLoader(runnable::run, contextClassLoader);
    }
@Test
    void testExecutorWithContextClassLoader() throws Exception {
        final Executor wrappedExecutor =
                ClassLoadingUtils.withContextClassLoader(
                        Executors.newDirectExecutorService(), TEST_CLASS_LOADER);

        final CompletableFuture<ClassLoader> contextClassLoader = new CompletableFuture<>();
        Runnable runnable =
                () -> contextClassLoader.complete(Thread.currentThread().getContextClassLoader());

        wrappedExecutor.execute(runnable);
        assertThat(contextClassLoader.get()).isSameAs(TEST_CLASS_LOADER);
    }