public boolean isActive() {
        return active.get();
    }
@Test
    public void testIsActive() {
        DynamicThreadPoolExecutor executor = new DynamicThreadPoolExecutor(
                1, 1, 1000L, TimeUnit.MILLISECONDS,
                1000L, true, 1000L,
                new ArrayBlockingQueue<>(1), "test", Thread::new, new ThreadPoolExecutor.DiscardOldestPolicy());
        Assert.assertTrue(executor.isActive());

        // waiting for terminated
        executor.destroy();
        while (!executor.isTerminated()) {
        }
        Assert.assertFalse(executor.isActive());
        executor.destroy();
        Assert.assertFalse(executor.isActive());
    }