// Path: src/main/java/com/amazonaws/codepipeline/jenkinsplugin/CodePipelineStateModel.java
// public enum CategoryType {
//     PleaseChooseACategory("Please Choose A Category"),
//     Build("Build"),
//     Test("Test");
// 
//     private final String name;
// 
//     CategoryType(final String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public static CategoryType fromName(final String name) {
//         for (final CategoryType category : values()) {
//             if (name.equals(category.getName())) {
//                 return category;
//             }
//         }
// 
//         throw new IllegalArgumentException("Cannot create enum from " + name + " value!");
//     }
// }


import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import com.amazonaws.codepipeline.jenkinsplugin.CodePipelineStateModel.CategoryType;
import com.amazonaws.services.codepipeline.model.Artifact;
import hudson.model.Failure;
                null);
    }

    @Test(expected=IllegalArgumentException.class)
    public void projectNameNoSpecialCharactersInNameFailure() {
        Validation.validateProjectName("No special Characters @", null);
    }

    @Test(expected=IllegalArgumentException.class)
    public void projectNameAllBadCharactersInNameFailure() {
        Validation.validateProjectName("! @ # $ % ^ & * ():+=?\\,.<> \"\"\"\"'''", null);
    }

    @Test
    public void projectNameAllBadCharactersFailure() {
        final char[] badChars = {'@', '!', '#', '$', '%', '^', '&', '*', '(', ')', '{', '}',
                '[', ']', ',', '.', '<', '>' , '?', '/', '\\', '"', '\'', ':', '+', '='};

        for (final char c : badChars) {
            final String error = "Invalid project name: " + c + ". The AWS CodePipeline Jenkins plugin supports project names with alphanumeric characters and the special characters - (minus sign) " +
                    "and _ (underscore).";
            thrown.expect(IllegalArgumentException.class);
            thrown.expectMessage(error);
            Validation.validateProjectName("" + c, null);
        }
    }

    @Test
    public void numberOfOutputsSuccess() {
        final List<Artifact> artifacts = new ArrayList<>();
// Path: src/main/java/com/amazonaws/codepipeline/jenkinsplugin/CodePipelineStateModel.java
// public enum CategoryType {
//     PleaseChooseACategory("Please Choose A Category"),
//     Build("Build"),
//     Test("Test");
// 
//     private final String name;
// 
//     CategoryType(final String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public static CategoryType fromName(final String name) {
//         for (final CategoryType category : values()) {
//             if (name.equals(category.getName())) {
//                 return category;
//             }
//         }
// 
//         throw new IllegalArgumentException("Cannot create enum from " + name + " value!");
//     }
// }


// Path: src/test/java/com/amazonaws/codepipeline/jenkinsplugin/ValidationTest.java
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import com.amazonaws.codepipeline.jenkinsplugin.CodePipelineStateModel.CategoryType;
import com.amazonaws.services.codepipeline.model.Artifact;
import hudson.model.Failure;

                null);
    }

    @Test(expected=IllegalArgumentException.class)
    public void projectNameNoSpecialCharactersInNameFailure() {
        Validation.validateProjectName("No special Characters @", null);
    }

    @Test(expected=IllegalArgumentException.class)
    public void projectNameAllBadCharactersInNameFailure() {
        Validation.validateProjectName("! @ # $ % ^ & * ():+=?\\,.<> \"\"\"\"'''", null);
    }

    @Test
    public void projectNameAllBadCharactersFailure() {
        final char[] badChars = {'@', '!', '#', '$', '%', '^', '&', '*', '(', ')', '{', '}',
                '[', ']', ',', '.', '<', '>' , '?', '/', '\\', '"', '\'', ':', '+', '='};

        for (final char c : badChars) {
            final String error = "Invalid project name: " + c + ". The AWS CodePipeline Jenkins plugin supports project names with alphanumeric characters and the special characters - (minus sign) " +
                    "and _ (underscore).";
            thrown.expect(IllegalArgumentException.class);
            thrown.expectMessage(error);
            Validation.validateProjectName("" + c, null);
        }
    }

    @Test
    public void numberOfOutputsSuccess() {
        final List<Artifact> artifacts = new ArrayList<>();
        for (int i = 0; i < Validation.MAX_ARTIFACTS; i++) {