private static Path createPluginJar(String resourceDir, Predicate<String> removeRuntimeClasses) throws IOException {
        Path inputDir = resourceDirectoryPath("test-plugins/" + resourceDir);
        Path binDir = Files.createTempDirectory(resourceDir + ".bin.");
        compileJavaSources(inputDir, binDir);
        Path jarFile = Files.createTempFile(resourceDir + ".", ".jar");
        try (JarOutputStream jar = openJarFile(jarFile)) {
            writeJar(jar, inputDir, removeRuntimeClasses);
            writeJar(jar, binDir, removeRuntimeClasses);
        }
        removeDirectory(binDir);
        jarFile.toFile().deleteOnExit();
        return jarFile;
    }
Get all plugin classes which are included in the specified plugins
@param plugins One or more plugins which are included in the plugin path.
@return A list of plugin class names
@throws AssertionError if any plugin failed to load, or no plugins were loaded.
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/TestPlugins.java