// Path: confucius-commons-lang/src/main/java/org/confucius/commons/lang/constants/FileSuffixConstants.java
// public interface FileSuffixConstants {
// 
//     /**
//      * Jar File suffix : ".jar"
//      */
//     String JAR = Constants.DOT + ProtocolConstants.JAR;
// 
//     /**
//      * War File suffix : ".jar"
//      */
//     String WAR = Constants.DOT + ProtocolConstants.WAR;
// 
//     /**
//      * Ear File suffix : ".jar"
//      */
//     String EAR = Constants.DOT + ProtocolConstants.EAR;
// 
//     /**
//      * Class File suffix : ".class"
//      *
//      * @since 1.0.0
//      */
//     String CLASS = Constants.DOT + Constants.CLASS;
// }


import com.google.common.collect.Sets;
import junit.framework.Assert;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.confucius.commons.lang.constants.FileSuffixConstants;
import org.junit.Test;
import java.io.IOException;
import java.lang.management.ClassLoadingMXBean;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
        resourceName = "///////META-INF//abc\\/def";
        resolvedResourceName = ClassLoaderUtils.ResourceType.DEFAULT.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

        resourceName = "java.lang.String.class";

        expectedResourceName = "java/lang/String.class";
        resolvedResourceName = ClassLoaderUtils.ResourceType.CLASS.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

        resourceName = "java.lang";
        expectedResourceName = "java/lang/";
        resolvedResourceName = ClassLoaderUtils.ResourceType.PACKAGE.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

    }

    @Test
    public void testGetClassResource() {
        URL classResourceURL = ClassLoaderUtils.getClassResource(classLoader, ClassLoaderUtilsTest.class);
        Assert.assertNotNull(classResourceURL);
        echo(classResourceURL);

        classResourceURL = ClassLoaderUtils.getClassResource(classLoader, String.class.getName());
        Assert.assertNotNull(classResourceURL);
        echo(classResourceURL);
    }

    @Test
    public void testGetResource() {
// Path: confucius-commons-lang/src/main/java/org/confucius/commons/lang/constants/FileSuffixConstants.java
// public interface FileSuffixConstants {
// 
//     /**
//      * Jar File suffix : ".jar"
//      */
//     String JAR = Constants.DOT + ProtocolConstants.JAR;
// 
//     /**
//      * War File suffix : ".jar"
//      */
//     String WAR = Constants.DOT + ProtocolConstants.WAR;
// 
//     /**
//      * Ear File suffix : ".jar"
//      */
//     String EAR = Constants.DOT + ProtocolConstants.EAR;
// 
//     /**
//      * Class File suffix : ".class"
//      *
//      * @since 1.0.0
//      */
//     String CLASS = Constants.DOT + Constants.CLASS;
// }


// Path: confucius-commons-lang/src/test/java/org/confucius/commons/lang/ClassLoaderUtilsTest.java
import com.google.common.collect.Sets;
import junit.framework.Assert;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.confucius.commons.lang.constants.FileSuffixConstants;
import org.junit.Test;
import java.io.IOException;
import java.lang.management.ClassLoadingMXBean;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;

        resourceName = "///////META-INF//abc\\/def";
        resolvedResourceName = ClassLoaderUtils.ResourceType.DEFAULT.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

        resourceName = "java.lang.String.class";

        expectedResourceName = "java/lang/String.class";
        resolvedResourceName = ClassLoaderUtils.ResourceType.CLASS.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

        resourceName = "java.lang";
        expectedResourceName = "java/lang/";
        resolvedResourceName = ClassLoaderUtils.ResourceType.PACKAGE.resolve(resourceName);
        Assert.assertEquals(expectedResourceName, resolvedResourceName);

    }

    @Test
    public void testGetClassResource() {
        URL classResourceURL = ClassLoaderUtils.getClassResource(classLoader, ClassLoaderUtilsTest.class);
        Assert.assertNotNull(classResourceURL);
        echo(classResourceURL);

        classResourceURL = ClassLoaderUtils.getClassResource(classLoader, String.class.getName());
        Assert.assertNotNull(classResourceURL);
        echo(classResourceURL);
    }

    @Test
    public void testGetResource() {
        URL resourceURL = ClassLoaderUtils.getResource(classLoader, ClassLoaderUtilsTest.class.getName() + FileSuffixConstants.CLASS);