@Override
    public Collection<ThreadPoolPlugin> getAllPlugins() {
        return mainLock.applyWithReadLock(() -> {
            // sort if necessary
            if (isEnableSort()) {
                return registeredPlugins.values().stream()
                        .sorted(pluginComparator)
                        .collect(Collectors.toList());
            }
            return registeredPlugins.values();
        });
    }
@Test
    public void testGetAllPlugins() {
        manager.register(new TestExecuteAwarePlugin());
        manager.register(new TestRejectedAwarePlugin());
        Assert.assertEquals(2, manager.getAllPlugins().size());
    }