// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/model/TestExecutionResult.java
// public class TestExecutionResult {
// 
//     private final ExecutedTestNamesDetails testDetails;
// 
//     public final List<String> pomWarningMessages;
// 
//     public TestExecutionResult(List<String> pomWarningMessages){
//         this(pomWarningMessages, new ExecutedTestNamesDetails());
//     }
// 
//     @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "oh well")
//     public TestExecutionResult(List<String> pomWarningMessages, ExecutedTestNamesDetails testDetails){
//         this.pomWarningMessages = Collections.unmodifiableList(pomWarningMessages);
//         this.testDetails = testDetails;
//     }
// 
//     @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "oh well")
//     public ExecutedTestNamesDetails getTestDetails() {
//         return testDetails;
//     }
// }
// 
// Path: plugins-compat-tester-model/src/main/java/org/jenkins/tools/test/model/hook/PluginCompatTesterHookBeforeCheckout.java
// public abstract class PluginCompatTesterHookBeforeCheckout implements PluginCompatTesterHook {
//     /**
//      * Check the value of {@code runCheckout} (if the plugin should be checked out again) and {@code
//      * pluginDir} (if set, the location of the plugin directory).
//      */
//     @Override
//     public void validate(Map<String, Object> toCheck) {
//         if((toCheck.get("runCheckout") != null &&
//             (toCheck.get("runCheckout").getClass().isPrimitive() || ClassUtils.wrapperToPrimitive(toCheck.get("runCheckout").getClass()) != null)) &&
//             (toCheck.get("pluginDir") != null && 
//             toCheck.get("pluginDir") instanceof String) ) {
//                 throw new IllegalArgumentException("A hook modified a required parameter for plugin checkout.");
//         }
//     } 
// }


import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.jenkins.tools.test.model.TestExecutionResult;
import org.jenkins.tools.test.model.hook.PluginCompatTesterHookBeforeCheckout;
package org.jenkins.tools.test.hook;


/**
 * Short circuit running any UI plugins that function as a helper methods. These are installed as
 * "plugins" by various parts of the UI and can't be tested through Maven.
 *
 * <p>Currently UI features are handed through the acceptance test harness. Future work for testing
 * JavaScript? Up to the user.
 *
 * @see <a href="js-libs">https://github.com/jenkinsci/js-libs</a>
 */
public class SkipUIHelperPlugins extends PluginCompatTesterHookBeforeCheckout {
    private static List<String> allBundlePlugins = Arrays.asList(
        "ace-editor", "bootstrap", "handlebars", "jquery-detached",
        "js-module-base", "momentjs", "numeraljs");

    public SkipUIHelperPlugins() {}

    @Override
    public List<String> transformedPlugins() {
        return Collections.unmodifiableList(allBundlePlugins);
    }

    /**
     * The plugin was identified as something that should be skipped. Create a {@link TestExecutionResult}
     * preventing forward movement. Also, indicates that we should skip the checkout completely.
     */
    @Override
    public Map<String, Object> action(Map<String, Object> moreInfo) {
        moreInfo.put("executionResult", 
// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/model/TestExecutionResult.java
// public class TestExecutionResult {
// 
//     private final ExecutedTestNamesDetails testDetails;
// 
//     public final List<String> pomWarningMessages;
// 
//     public TestExecutionResult(List<String> pomWarningMessages){
//         this(pomWarningMessages, new ExecutedTestNamesDetails());
//     }
// 
//     @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "oh well")
//     public TestExecutionResult(List<String> pomWarningMessages, ExecutedTestNamesDetails testDetails){
//         this.pomWarningMessages = Collections.unmodifiableList(pomWarningMessages);
//         this.testDetails = testDetails;
//     }
// 
//     @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "oh well")
//     public ExecutedTestNamesDetails getTestDetails() {
//         return testDetails;
//     }
// }
// 
// Path: plugins-compat-tester-model/src/main/java/org/jenkins/tools/test/model/hook/PluginCompatTesterHookBeforeCheckout.java
// public abstract class PluginCompatTesterHookBeforeCheckout implements PluginCompatTesterHook {
//     /**
//      * Check the value of {@code runCheckout} (if the plugin should be checked out again) and {@code
//      * pluginDir} (if set, the location of the plugin directory).
//      */
//     @Override
//     public void validate(Map<String, Object> toCheck) {
//         if((toCheck.get("runCheckout") != null &&
//             (toCheck.get("runCheckout").getClass().isPrimitive() || ClassUtils.wrapperToPrimitive(toCheck.get("runCheckout").getClass()) != null)) &&
//             (toCheck.get("pluginDir") != null && 
//             toCheck.get("pluginDir") instanceof String) ) {
//                 throw new IllegalArgumentException("A hook modified a required parameter for plugin checkout.");
//         }
//     } 
// }


// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/hook/SkipUIHelperPlugins.java
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.jenkins.tools.test.model.TestExecutionResult;
import org.jenkins.tools.test.model.hook.PluginCompatTesterHookBeforeCheckout;

package org.jenkins.tools.test.hook;


/**
 * Short circuit running any UI plugins that function as a helper methods. These are installed as
 * "plugins" by various parts of the UI and can't be tested through Maven.
 *
 * <p>Currently UI features are handed through the acceptance test harness. Future work for testing
 * JavaScript? Up to the user.
 *
 * @see <a href="js-libs">https://github.com/jenkinsci/js-libs</a>
 */
public class SkipUIHelperPlugins extends PluginCompatTesterHookBeforeCheckout {
    private static List<String> allBundlePlugins = Arrays.asList(
        "ace-editor", "bootstrap", "handlebars", "jquery-detached",
        "js-module-base", "momentjs", "numeraljs");

    public SkipUIHelperPlugins() {}

    @Override
    public List<String> transformedPlugins() {
        return Collections.unmodifiableList(allBundlePlugins);
    }

    /**
     * The plugin was identified as something that should be skipped. Create a {@link TestExecutionResult}
     * preventing forward movement. Also, indicates that we should skip the checkout completely.
     */
    @Override
    public Map<String, Object> action(Map<String, Object> moreInfo) {
        moreInfo.put("executionResult", 
            new TestExecutionResult(Collections.singletonList("Plugin unsupported at this time, skipping")));