@Override
    public void clear() {
        mainLock.runWithWriteLock(() -> {
            Collection<ThreadPoolPlugin> plugins = new ArrayList<>(registeredPlugins.values());
            registeredPlugins.clear();
            forQuickIndexes(QuickIndex::clear);
            plugins.forEach(ThreadPoolPlugin::stop);
        });
    }
@Test
    public void testClear() {
        manager.register(new TestExecuteAwarePlugin());
        manager.clear();
        Assert.assertTrue(manager.getAllPlugins().isEmpty());
    }