@Override
    public boolean tryRegister(ThreadPoolPlugin plugin) {
        return mainLock.applyWithWriteLock(() -> {
            if (registeredPlugins.containsKey(plugin.getId())) {
                return false;
            }
            register(plugin);
            return true;
        });
    }
@Test
    public void testTryRegister() {
        Assert.assertTrue(manager.tryRegister(new TestExecuteAwarePlugin()));
        Assert.assertFalse(manager.tryRegister(new TestExecuteAwarePlugin()));
    }