// Path: srcdeps-core/src/main/java/org/srcdeps/core/BuildRequest.java
// public enum Verbosity {
//     debug, error, info, trace, warn;
// 
//     public static Verbosity fastValueOf(String level) {
//         SrcdepsCoreUtils.assertArgNotNull(level, "Verbosity name");
//         switch (level.toLowerCase(Locale.ROOT)) {
//         case "trace":
//             return trace;
//         case "debug":
//             return debug;
//         case "info":
//             return info;
//         case "warn":
//             return warn;
//         case "error":
//             return error;
//         default:
//             throw new IllegalStateException("No such " + Verbosity.class.getName() + " with name [" + level + "]");
//         }
//     }
// 
// }


import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.junit.Assert;
import org.junit.Test;
import org.srcdeps.core.BuildRequest.Verbosity;
/**
 * Copyright 2015-2019 Maven Source Dependencies
 * Plugin contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.srcdeps.core;



public class BuildRequestTest {

    @Test
    public void getHash() {

        final Map<String, String> env1 = new HashMap<>();
        env1.put("k1", "v1");
        env1.put("k2", "v2");

        final Set<String> props = new HashSet<>();
        props.add("prop1");
        props.add("prop2");

        String id1 = BuildRequest.computeHash(true, true, Arrays.<String>asList("arg1", "arg2"), env1, props,
                StandardCharsets.UTF_8, GavSet.builder().include("org.mygroup").exclude("other-group").build(),
                Arrays.asList("url1", "url2"), true, SrcVersion.parse("1.2.3-SRC-revision-deadbeef"), "1.2.3", true,
// Path: srcdeps-core/src/main/java/org/srcdeps/core/BuildRequest.java
// public enum Verbosity {
//     debug, error, info, trace, warn;
// 
//     public static Verbosity fastValueOf(String level) {
//         SrcdepsCoreUtils.assertArgNotNull(level, "Verbosity name");
//         switch (level.toLowerCase(Locale.ROOT)) {
//         case "trace":
//             return trace;
//         case "debug":
//             return debug;
//         case "info":
//             return info;
//         case "warn":
//             return warn;
//         case "error":
//             return error;
//         default:
//             throw new IllegalStateException("No such " + Verbosity.class.getName() + " with name [" + level + "]");
//         }
//     }
// 
// }


// Path: srcdeps-core/src/test/java/org/srcdeps/core/BuildRequestTest.java
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.junit.Assert;
import org.junit.Test;
import org.srcdeps.core.BuildRequest.Verbosity;

/**
 * Copyright 2015-2019 Maven Source Dependencies
 * Plugin contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.srcdeps.core;



public class BuildRequestTest {

    @Test
    public void getHash() {

        final Map<String, String> env1 = new HashMap<>();
        env1.put("k1", "v1");
        env1.put("k2", "v2");

        final Set<String> props = new HashSet<>();
        props.add("prop1");
        props.add("prop2");

        String id1 = BuildRequest.computeHash(true, true, Arrays.<String>asList("arg1", "arg2"), env1, props,
                StandardCharsets.UTF_8, GavSet.builder().include("org.mygroup").exclude("other-group").build(),
                Arrays.asList("url1", "url2"), true, SrcVersion.parse("1.2.3-SRC-revision-deadbeef"), "1.2.3", true,
                Collections.singleton(Ga.of("org:a")), false, 50000, Verbosity.error);