@Override
    public void execute(Runnable r) {
        runQueue.add(r);
        schedule(r);
    }
@Test
    void testNonSerial() {
        int total = 10;

        Map<String, Integer> map = new HashMap<>();
        map.put("val", 0);

        Semaphore semaphore = new Semaphore(1);
        CountDownLatch startLatch = new CountDownLatch(1);
        AtomicBoolean failed = new AtomicBoolean(false);

        for (int i = 0; i < total; i++) {
            final int index = i;
            service.execute(() -> {
                if (!semaphore.tryAcquire()) {
                    failed.set(true);
                }
                try {
                    startLatch.await();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                int num = map.get("val");
                map.put("val", num + 1);
                if (num != index) {
                    failed.set(true);
                }
                semaphore.release();
            });
        }

        await().until(() -> ((ThreadPoolExecutor) service).getActiveCount() == 4);
        startLatch.countDown();
        await().until(() -> ((ThreadPoolExecutor) service).getCompletedTaskCount() == total);
        Assertions.assertTrue(failed.get());
    }