public static boolean validatePlugin(PluginLookup.PluginType type, Class<?> pluginClass) {
        switch (type) {
            case INPUT:
                return containsAllMethods(inputMethods, pluginClass.getMethods());
            case FILTER:
                return containsAllMethods(filterMethods, pluginClass.getMethods());
            case CODEC:
                return containsAllMethods(codecMethods, pluginClass.getMethods());
            case OUTPUT:
                return containsAllMethods(outputMethods, pluginClass.getMethods());
            default:
                throw new IllegalStateException("Unknown plugin type for validation: " + type);
        }
    }
@Ignore("Test failing on windows for many weeks. See https://github.com/elastic/logstash/issues/10926")
    @Test
    public void testInvalidInputPlugin() throws IOException {
        Path tempJar = null;
        try {
            tempJar = Files.createTempFile("pluginValidationTest", "inputPlugin.jar");
            final InputStream resourceJar =
                    getClass().getResourceAsStream("logstash-input-java_input_example-1.0.3.jar");
            Files.copy(resourceJar, tempJar, REPLACE_EXISTING);

            URL[] jarUrl = {tempJar.toUri().toURL()};
            URLClassLoader cl = URLClassLoader.newInstance(jarUrl);
            Class<?> oldInputClass = cl.loadClass("org.logstash.javaapi.JavaInputExample");

            Assert.assertNotNull(oldInputClass);
            Assert.assertFalse(PluginValidator.validatePlugin(PluginLookup.PluginType.INPUT, oldInputClass));
        } catch (Exception ex) {
            Assert.fail("Failed with exception: " + ex);
        } finally {
            if (tempJar != null) {
                Files.deleteIfExists(tempJar);
            }
        }
    }