@Test
    public void testLoadPlugin() {
        String path = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath();
        PluginClassLoader pluginClassLoader = PluginClassLoader.getFromPluginUrl(path + "plugins",
                Thread.currentThread().getContextClassLoader());
        Map<String, PluginDefinition> pluginDefinitionMap = pluginClassLoader.getPluginDefinitions();
        Assertions.assertEquals(1, pluginDefinitionMap.size());

        PluginDefinition pluginDefinition = Lists.newArrayList(pluginDefinitionMap.values()).get(0);
        Assertions.assertNotNull(pluginDefinition);
        List<String> classNames = pluginDefinition.getPluginClasses();
        Assertions.assertTrue(CollectionUtils.isNotEmpty(classNames));

        for (String name : classNames) {
            try {
                Class<?> cls = pluginClassLoader.loadClass(name);
                Plugin plugin = (Plugin) cls.getDeclaredConstructor().newInstance();
                Assertions.assertTrue(plugin instanceof ProcessPlugin
                        || plugin instanceof PollerPlugin);
            } catch (Exception e) {
                Assertions.assertTrue(e instanceof ClassNotFoundException);
                Assertions.fail();
            }
        }
    }
The test plugin jar was packaged from manager-plugins,
naming it to `manager-plugin-example.jar`.
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/plugin/PluginClassLoaderTest.java