content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 12:42:39 GMT 2024
   */
  
  package org.apache.commons.lang3;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import java.lang.reflect.Array;
  import java.util.LinkedList;
  import java.util.List;
  import org.apache.commons.lang3.ClassUtils;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ClassUtils_ESTest extends ClassUtils_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPublicMethodThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        Class<Object>[] classArray = (Class<Object>[]) Array.newInstance(Class.class, 7);
        Class<String>[] arg2 = (Class<String>[]) Array.newInstance(Class.class, 1);
        // Undeclared exception!
        try { 
          ClassUtils.getPublicMethod(classArray[0], "java.lang", arg2);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.apache.commons.lang3.ClassUtils", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWrapperToPrimitiveReturningNull() throws Throwable  {
        // Test that the method returns null when given a primitive type class object
        Class<Object> arg0 = Object.class;
        Class<?> wrapperToPrimitive = ClassUtils.wrapperToPrimitive(arg0);
        assertNull(wrapperToPrimitive);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitiveToWrapperReturningClassWhereIsArrayIsTrue() throws Throwable  {
        // Given an array type as argument to primitiveToWrapper
        Class<?> arg0 = ClassUtils.getClass("org.apache.commons.lang3.builder.ToStringStyle$DefaultToStringStyle[]");
        
        // When we call the method with this argument
        Class<?> wrappedClass = ClassUtils.primitiveToWrapper(arg0);
        
        // Then we expect that the returned class is the same as the input class
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClassArraysReturningFalse() throws Throwable  {
        // Given: A class array with one element that is a class object
        Class<Object>[] classes = (Class<Object>[]) Array.newInstance(Class.class, 1);
        
        // When: The method is called with the class array and itself as arguments
        boolean assignable = ClassUtils.isAssignable(classes, classes);
        
        // Then: The returned value should be false, since the class array cannot be assigned to itself
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssReturningFalse() throws Throwable  {
        // Given: we have two classes, Character and String
        Class<Character> arg1 = Character.TYPE;
        Class<String> arg0 = String.class;
        
        // When: we check if String is assignable from Character
        boolean assignable = ClassUtils.isAssignable(arg0, arg1);
        
        // Then: String is not assignable from Character
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSimpleNameTaking2ArgumentsReturningNull() throws Throwable  {
        // No Comments were added
        String simpleName = ClassUtils.getSimpleName((Object) null, (String) null);
        assertNull(simpleName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTaking2ArgumentsReturningNull() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName((Object) null, (String) null);
        assertNull(shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTakingStringReturningEmptyString() throws Throwable  {
        // Test that an empty string returns an empty string
        String shortCanonicalName = ClassUtils.getShortCanonicalName("");
        assertEquals("", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTaking2ArgumentsReturningEmptyString() throws Throwable  {
        // Check that null input returns an empty string
        String shortCanonicalName = ClassUtils.getShortCanonicalName((Object) null, "");
        assertEquals("", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTaking2ArgumentsReturningNull() throws Throwable  {
        // Given an array of objects containing a single null object
        Object[] objectArray = new Object[1];
        objectArray[0] = null;
        
        // When the getPackageName method is called with the array and a null package name
        String packageName = ClassUtils.getPackageName(objectArray, null);
        
        // Then the result should be null
        assertNull(packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingStringReturningNonEmptyString() throws Throwable  {
        // Given a class located in the "java.lang" package
        Class<?> javaLangClass = Class.forName("java.lang.StringBuilder");
        
        // When we get the canonical name of this class using the "getPackageCanonicalName" method
        String packageCanonicalName = ClassUtils.getPackageCanonicalName(javaLangClass);
        
        // Then we should get the canonical name of the package that contains this class, which is "java"
        assertEquals("java", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTaking2ArgumentsReturningNull() throws Throwable  {
        // No Comments were added
        String packageCanonicalName = ClassUtils.getPackageCanonicalName((Object) null, (String) null);
        assertNull(packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassTaking3ArgumentsThrowsClassNotFoundException0() throws Throwable  {
        // Setup
        ClassLoader arg0 = ClassLoader.getSystemClassLoader();
        
        // Test
        try {
        ClassUtils.getClass(arg0, "[]", false);
        fail("Expecting exception: ClassNotFoundException");
        } catch (ClassNotFoundException e) {
        // Expected behavior
        }
        
        // Verify
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitiveToWrapperWithClassWhereIsPrimitiveIsTrue() throws Throwable  {
        // Given a primitive type Character.TYPE
        Class<Character> arg0 = Character.TYPE;
        
        // When the method primitiveToWrapper is called with this argument
        Class<?> primitiveToWrapper = ClassUtils.primitiveToWrapper(arg0);
        
        // Then the return value should be a wrapper class for Character.TYPE
        assertFalse(primitiveToWrapper.isPrimitive());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1WithClassWhereIsPrimitiveIsTrue() throws Throwable  {
        // Given a Character class
        Class<Character> charClass = Character.TYPE;
        
        // When checking if it is assignable from itself
        boolean assignable = ClassUtils.isAssignable(charClass, charClass);
        
        // Then the result should be true
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1WithNullAndIsAssignableTaking2ClasssAnd1ReturningFalse() throws Throwable  {
        // Test that isAssignable returns false when given null inputs
        boolean assignable = ClassUtils.isAssignable((Class<?>) null, (Class<?>) null, true);
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveWrapperReturningFalse() throws Throwable  {
        // No Comments were added
        boolean primitiveWrapper = ClassUtils.isPrimitiveWrapper((Class<?>) null);
        assertFalse(primitiveWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveWrapperReturningTrue() throws Throwable  {
        // Given a Character class object
        Class<Character> characterClass = Character.class;
        
        // When checking if the class is a primitive wrapper type
        boolean primitiveWrapper = ClassUtils.isPrimitiveWrapper(characterClass);
        
        // Then assert that it is indeed a primitive wrapper type
        assertTrue(primitiveWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClassArraysAnd1WithTrue() throws Throwable  {
        // Test that isAssignable returns true when both parameters are null
        boolean assignable = ClassUtils.isAssignable((Class<?>[]) null, (Class<?>[]) null, true);
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingStringReturningNonEmptyString() throws Throwable  {
        // rollbacked to evosuite
        String packageName = ClassUtils.getPackageName("java.lang");
        assertEquals("java", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingString0() throws Throwable  {
        // No Comments were added
        String packageName = ClassUtils.getPackageName("[]");
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingStringWithEmptyString() throws Throwable  {
        // This test checks that the getPackageName method returns an empty string when given an empty class name.
        String packageName = ClassUtils.getPackageName("");
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingClassReturningNonEmptyString() throws Throwable  {
        // Given a class object that represents the "Object" class in the "java.lang" package
        Class<Object> objClass = Object.class;
        
        // When we call the getPackageName method on this class object
        String packageName = ClassUtils.getPackageName(objClass);
        
        // Then the method should return the string "java.lang" as the package name of the "Object" class
        assertEquals("java.lang", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSimpleNameTakingClassReturningNonEmptyString() throws Throwable  {
        // Given a class object for String class
        Class<String> stringClass = String.class;
        
        // When calling getSimpleName method on the class object
        String simpleName = ClassUtils.getSimpleName(stringClass);
        
        // Then assert that the method returns "String"
        assertEquals("String", simpleName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingString0() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName("java.lang");
        assertEquals("lang", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTakingStringThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          ClassUtils.getShortCanonicalName("[]");
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingString0() throws Throwable  {
        // No Comments were added
        String packageCanonicalName = ClassUtils.getPackageCanonicalName("[L");
        assertEquals("", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingClassReturningEmptyString() throws Throwable  {
        // Test that the getPackageCanonicalName() method returns an empty string when passed a null class object
        String packageCanonicalName = ClassUtils.getPackageCanonicalName((Class<?>) null);
        assertEquals("", packageCanonicalName);
        
        // Check that the returned value is indeed an empty string
        assertTrue(packageCanonicalName.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingClassReturningNonEmptyString() throws Throwable  {
        // Given: An object of type Object.class
        Class<Object> arg0 = Object.class;
        
        // When: The package canonical name is retrieved using the given object
        String packageCanonicalName = ClassUtils.getPackageCanonicalName(arg0);
        
        // Then: The returned value should be the canonical name of the java.lang package
        assertEquals("java.lang", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTaking2ArgumentsReturningEmptyString() throws Throwable  {
        // Given: A null object and an empty string as input parameters
        // When: The getPackageCanonicalName method is called with these parameters
        // Then: The returned value should be an empty string ""
        String packageCanonicalName = ClassUtils.getPackageCanonicalName((Object) null, "");
        assertEquals("", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // No Comments were added
        String packageCanonicalName = ClassUtils.getPackageCanonicalName((Object) "tw73!,T$Oegl!", "tw73!,T$Oegl!");
        assertEquals("java.lang", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTakingClassReturningEmptyString() throws Throwable  {
        // Test that the method returns an empty string when passed a null input.
        String shortCanonicalName = ClassUtils.getShortCanonicalName((Class<?>) null);
        assertEquals("", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTakingClassReturningNonEmptyString() throws Throwable  {
        // The Object.class represents a class of type java.lang.Object, which is a base class for all classes in Java.
        Class<Object> arg0 = Object.class;
        
        // The method getShortCanonicalName takes a class as an argument and returns a string that represents the shortened version of the canonical name of the class.
        String shortCanonicalName = ClassUtils.getShortCanonicalName(arg0);
        
        // The assertionEquals is used to compare the result of getShortCanonicalName with the expected value, which is "Object".
        assertEquals("Object", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTaking2ArgumentsReturningNull() throws Throwable  {
        // No Comments were added
        String shortCanonicalName = ClassUtils.getShortCanonicalName((Object) null, (String) null);
        assertNull(shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // Arrange
        String canonicalName = ClassUtils.getShortCanonicalName((Object) "Object", "Object");
        
        // Act
        String shortCanonicalName = ClassUtils.getShortCanonicalName(canonicalName);
        
        // Assert
        assertEquals("String", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassTaking3ArgumentsThrowsClassNotFoundException1() throws Throwable  {
        // Arrange
        ClassLoader classLoader = ClassLoader.getSystemClassLoader();
        
        // Act and Assert
        try {
        ClassUtils.getClass(classLoader, "ClassUtils.1.1[]", false);
        fail("Expecting exception: ClassNotFoundException");
        } catch (ClassNotFoundException e) {
        assertTrue(true);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsInnerClass() throws Throwable  {
        // Given a String object as an argument
        Class<String> arg0 = String.class;
        
        // When the isInnerClass method is called with this argument
        boolean innerClass = ClassUtils.isInnerClass(arg0);
        
        // Then the result should be false
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassTaking1And1() throws Throwable  {
        // No Comments were added
        Class<?> arg0 = ClassUtils.getClass("org.apache.commons.lang3.ClassUtils$2", true);
        boolean innerClass = ClassUtils.isInnerClass(arg0);
        assertTrue(innerClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsInnerClassWithNull() throws Throwable  {
        // Given
        // When
        boolean innerClass = ClassUtils.isInnerClass((Class<?>) null);
        
        // Then
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWrappersToPrimitivesReturningNonEmptyArray() throws Throwable  {
        // Given a single wrapper class as argument
        Class<Object>[] arg0 = (Class<Object>[]) Array.newInstance(Class.class, 1);
        
        // When the method is called with this argument
        Class<?>[] wrappersToPrimitives = ClassUtils.wrappersToPrimitives(arg0);
        
        // Then it should return an array of primitives corresponding to the wrapper class
        assertEquals(1, wrappersToPrimitives.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWrappersToPrimitivesReturningNull() throws Throwable  {
        // Test that the wrappersToPrimitives method returns null if the input array is null
        Class<?>[] wrappersToPrimitives = ClassUtils.wrappersToPrimitives((Class<?>[]) null);
        assertNull(wrappersToPrimitives);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWrappersToPrimitivesReturningEmptyArray() throws Throwable  {
        Class<Object>[] arg0 = (Class<Object>[]) Array.newInstance(Class.class, 0);
        
        // When the method wrappersToPrimitives is called with this array
        Class<?>[] wrappersToPrimitives = ClassUtils.wrappersToPrimitives(arg0);
        
        // Then an empty array should be returned
        assertEquals(0, wrappersToPrimitives.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitivesToWrappersReturningNull() throws Throwable  {
        // No Comments were added
        Class<?>[] primitivesToWrappers = ClassUtils.primitivesToWrappers((Class<?>[]) null);
        assertNull(primitivesToWrappers);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitivesToWrappersReturningNonEmptyArray() throws Throwable  {
        // Test that the "primitivesToWrappers" method returns an array with a length of 1
        Class<Object>[] arg0 = (Class<Object>[]) Array.newInstance(Class.class, 1);
        Class<?>[] primitivesToWrappers = ClassUtils.primitivesToWrappers(arg0);
        assertEquals(1, primitivesToWrappers.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitiveToWrapperReturningClassWhereGetModifiersIsZero() throws Throwable  {
        // Given a class representing the wrapper type of a primitive type
        Class<?> arg0 = ClassUtils.getClass("org.apache.commons.lang3.ClassUtils$1$1");
        
        // When converting the primitive type to its corresponding wrapper type using the "primitiveToWrapper" method
        Class<?> wrapperType = ClassUtils.primitiveToWrapper(arg0);
        
        // Then the resulting wrapper type should be a class representing an annotation type (as it is not possible to create instances of annotation types)
        assertFalse(wrapperType.isAnnotation());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrimitiveToWrapperReturningNull() throws Throwable  {
        // Given: A class that maps primitive types to their corresponding wrapper classes
        Class<?> primitiveToWrapper = ClassUtils.primitiveToWrapper((Class<?>) null);
        
        // When: The method is called with a null parameter
        assertNull(primitiveToWrapper);
        
        // Then: The method should return null
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1WithFalse() throws Throwable  {
        // Given
        Class<Character> charType = Character.TYPE;
        Class<Object> objectClass = Object.class;
        
        // When
        boolean assignable = ClassUtils.isAssignable(charType, objectClass, false);
        
        // Then
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1WithClassWhereIsPrimitiveIsFalse() throws Throwable  {
        // Test that the two classes are not assignable to each other
        Class<Character> characterClass = Character.TYPE;
        Class<Object> objectClass = Object.class;
        boolean assignable = ClassUtils.isAssignable(objectClass, characterClass, true);
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1() throws Throwable  {
        // Given a Character primitive type and an Object class
        Class<Character> arg0 = Character.TYPE;
        Class<Object> arg1 = Object.class;
        
        // When we check if the Character is assignable to the Object class
        boolean assignable = ClassUtils.isAssignable(arg0, arg1, true);
        
        // Then we expect it to be assignable
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssReturningTrue() throws Throwable  {
        // Given: Two classes - Character and its wrapper class Character
        Class<Character> arg0 = Character.class;
        Class<Character> arg1 = Character.TYPE;
        
        // When: Checking if the wrapper class is assignable to the primitive type
        boolean assignable = ClassUtils.isAssignable(arg0, arg1);
        
        // Then: The wrapper class should be assignable to the primitive type
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1WithNullAndIsAssignableTaking2ClasssAnd1ReturningTrue() throws Throwable  {
        // Given: we have a class String and a null value
        // When: we call the isAssignable method with the String class and the null value
        // Then: the result should be true, as any reference type can be assigned to null
        Class<String> arg1 = String.class;
        boolean assignable = ClassUtils.isAssignable((Class<?>) null, arg1, true);
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClasssAnd1ReturningFalse() throws Throwable  {
        // rollbacked to evosuite
        Class<Character> arg1 = Character.TYPE;
        boolean assignable = ClassUtils.isAssignable((Class<?>) null, arg1, true);
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveOrWrapperReturningFalse() throws Throwable  {
        // Given
        Class<Object> objectClass = Object.class;
        
        // When
        boolean primitiveOrWrapper = ClassUtils.isPrimitiveOrWrapper(objectClass);
        
        // Then
        assertFalse(primitiveOrWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveOrWrapperReturningTrue() throws Throwable  {
        // Given a character class
        Class<Character> charClass = Character.class;
        
        // When the isPrimitiveOrWrapper method is called with this class
        boolean primitiveOrWrapper = ClassUtils.isPrimitiveOrWrapper(charClass);
        
        // Then it should return true, as Character is a primitive or wrapper type
        assertTrue(primitiveOrWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveOrWrapperWithNull() throws Throwable  {
        // when passed a null value as its argument.
        boolean primitiveOrWrapper = ClassUtils.isPrimitiveOrWrapper((Class<?>) null);
        assertFalse(primitiveOrWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPrimitiveOrWrapperWithClassWhereIsPrimitiveIsTrue() throws Throwable  {
        // Given: A class instance of Character.TYPE
        Class<Character> charClass = Character.TYPE;
        
        // When: The method is invoked with the class instance
        boolean primitiveOrWrapper = ClassUtils.isPrimitiveOrWrapper(charClass);
        
        // Then: The method should return true, indicating that the class is a primitive or wrapper type
        assertTrue(primitiveOrWrapper);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToClass() throws Throwable  {
        // Given
        ClassUtils.Interfaces[] interfaces = ClassUtils.Interfaces.values();
        Class<?>[] classes = ClassUtils.toClass(interfaces);
        
        // When
        boolean assignable = ClassUtils.isAssignable(classes, classes, false);
        
        // Then
        assertNotNull(classes);
        assertEquals(2, classes.length);
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClassArraysAnd10() throws Throwable  {
        // Set up test data
        Class<Character>[] classes = (Class<Character>[]) Array.newInstance(Class.class, 6);
        
        // Execute the test
        boolean assignable = ClassUtils.isAssignable(classes, classes, false);
        
        // Verify results
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClassArraysAnd11() throws Throwable  {
        // Given: A list of classes to be assigned
        Class<Object>[] arg1 = (Class<Object>[]) Array.newInstance(Class.class, 1);
        
        // And: A list of classes to assign to
        Class<Object>[] arg0 = (Class<Object>[]) Array.newInstance(Class.class, 8);
        
        // When: Checking if the classes are assignable
        boolean assignable = ClassUtils.isAssignable(arg0, arg1, false);
        
        // Then: The classes should not be assignable
        assertFalse(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testConvertClassesToClassNames() throws Throwable  {
        // No Comments were added
        List<String> convertClassesToClassNames = ClassUtils.convertClassesToClassNames((List<Class<?>>) null);
        assertNull(convertClassesToClassNames);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testConvertClassNamesToClassesReturningNull() throws Throwable  {
        // No Comments were added
        List<Class<?>> convertClassNamesToClasses = ClassUtils.convertClassNamesToClasses((List<String>) null);
        assertNull(convertClassNamesToClasses);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testConvertClassNamesToClassesReturningListWhereIsEmptyIsTrue() throws Throwable  {
        // No Comments were added
        LinkedList<String> arg0 = new LinkedList<String>();
        List<Class<?>> convertClassNamesToClasses = ClassUtils.convertClassNamesToClasses(arg0);
        assertEquals(0, convertClassNamesToClasses.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAllInterfaces() throws Throwable  {
        // No Comments were added
        List<Class<?>> allInterfaces = ClassUtils.getAllInterfaces((Class<?>) null);
        assertNull(allInterfaces);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAllSuperclassesReturningListWhereIsEmptyIsFalse() throws Throwable  {
        // Arrange
        Class<String> stringClass = String.class;
        
        // Act
        List<Class<?>> allSuperclasses = ClassUtils.getAllSuperclasses(stringClass);
        
        // Assert
        assertFalse(allSuperclasses.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAllSuperclassesReturningNull() throws Throwable  {
        // No Comments were added
        List<Class<?>> allSuperclasses = ClassUtils.getAllSuperclasses((Class<?>) null);
        assertNull(allSuperclasses);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAllSuperclassesReturningListWhereIsEmptyIsTrue() throws Throwable  {
        // Given a class with no superclasses
        Class<Object> arg0 = Object.class;
        
        // When we get all the superclasses of this class
        List<Class<?>> allSuperclasses = ClassUtils.getAllSuperclasses(arg0);
        
        // Then we expect an empty list as there are no superclasses
        assertEquals(0, allSuperclasses.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingString1() throws Throwable  {
        // No Comments were added
        String packageName = ClassUtils.getPackageName("L)0");
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingString2() throws Throwable  {
        // No Comments were added
        String packageName = ClassUtils.getPackageName("Lp)7;");
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingStringWithNull() throws Throwable  {
        // Test that the getPackageCanonicalName method returns an empty string when passed a null value
        String packageCanonicalName = ClassUtils.getPackageCanonicalName((String) null);
        assertEquals("", packageCanonicalName);
        
        // This test is checking that the method returns an empty string when passed a null value, which is expected behavior
        // since the method is designed to handle null values and return an empty string in that case.
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTakingClassReturningEmptyString() throws Throwable  {
        // No Comments were added
        String packageName = ClassUtils.getPackageName((Class<?>) null);
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTaking2ArgumentsReturningEmptyString() throws Throwable  {
        // No Comments were added
        String packageName = ClassUtils.getPackageName((Object) null, "");
        assertEquals("", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageNameTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // Given: an object and a fully qualified class name
        Object arg0 = new Object();
        String fullyQualifiedClassName = "java.lang.Class";
        
        // When: we call the getPackageName method with these parameters
        String packageName = ClassUtils.getPackageName(arg0, fullyQualifiedClassName);
        
        // Then: the method should return the package name of the class
        assertEquals("java.lang", packageName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSimpleNameTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // Given: A string variable named simpleName is being initialized to a value
        String simpleName = ClassUtils.getSimpleName((Object) null, ":`R%&IRukWLfA7cc");
        
        // When: The method getSimpleName() from the ClassUtils class is called with a null object and a string as an argument
        assertEquals(":`R%&IRukWLfA7cc", simpleName);
        
        // Then: The returned value is equal to the original string, demonstrating that the method returns the same string that was passed in
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSimpleNameTakingClassReturningEmptyString() throws Throwable  {
        // Test the behavior of getSimpleName with a null argument
        String simpleName = ClassUtils.getSimpleName((Class<?>) null);
        assertEquals("", simpleName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingString1() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName("$");
        assertEquals(".", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingString2() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName("[L;");
        assertEquals("[]", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingString3() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName("[B");
        assertEquals("byte[]", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingString4() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName("[L");
        assertEquals("L[]", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingStringReturningEmptyString() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName((String) null);
        assertEquals("", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingClassReturningEmptyString() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName((Class<?>) null);
        assertEquals("", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTaking2ArgumentsReturningEmptyString() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName((Object) null, "");
        assertEquals("", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // No Comments were added
        String shortClassName = ClassUtils.getShortClassName((Object) "", (String) null);
        assertNotNull(shortClassName);
        assertEquals("String", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHierarchyTaking2Arguments() throws Throwable  {
        // Object is used as the first argument for the hierarchy method, which returns a list of interfaces implemented by this object and its superclasses.
        Class<Object> arg0 = Object.class;
        
        // The second argument to the hierarchy method is a flag that specifies whether to include interfaces or not. In this case, we are including interfaces.
        ClassUtils.Interfaces arg1 = ClassUtils.Interfaces.INCLUDE;
        
        // Calling the hierarchy method with Object.class and INCLUDE as arguments returns an Iterable<Class<?>> object that represents the class hierarchy for Object.
        Iterable<Class<?>> hierarchy = ClassUtils.hierarchy(arg0, arg1);
        
        // Assert that the hierarchy is not null
        assertNotNull(hierarchy);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassTaking1And1ThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          ClassUtils.getClass((ClassLoader) null, (String) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // className must not be null.
           //
           verifyException("org.apache.commons.lang3.ClassUtils", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHierarchyTakingClass() throws Throwable  {
        // Arrange
        Class<String> stringClass = String.class;
        
        // Act
        Iterable<Class<?>> hierarchy = ClassUtils.hierarchy(stringClass);
        
        // Assert
        assertNotNull(hierarchy);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassUtils() throws Throwable  {
        // rollbacked to evosuite
        ClassUtils classUtils = new ClassUtils();
        assertEquals('$', ClassUtils.INNER_CLASS_SEPARATOR_CHAR);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsAssignableTaking2ClassArraysReturningTrue() throws Throwable  {
        // Test that isAssignable returns true when given null inputs
        boolean assignable = ClassUtils.isAssignable((Class<?>[]) null, (Class<?>[]) null);
        assertTrue(assignable);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortCanonicalNameTakingStringReturningNonEmptyString() throws Throwable  {
        // No Comments were added
        String shortCanonicalName = ClassUtils.getShortCanonicalName("[Ljava.util.List;");
        assertEquals("List[]", shortCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortClassNameTakingClassReturningNonEmptyString() throws Throwable  {
        // Given: a class "org.apache.commons.lang3.ClassUtils[]"
        Class<?> arg0 = ClassUtils.getClass("org.apache.commons.lang3.ClassUtils[]");
        
        // When: we call getShortClassName on the class
        String shortClassName = ClassUtils.getShortClassName(arg0);
        
        // Then: the returned short className is "ClassUtils[]"
        assertEquals("ClassUtils[]", shortClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPackageCanonicalNameTakingString1() throws Throwable  {
        // No Comments were added
        String packageCanonicalName = ClassUtils.getPackageCanonicalName("[");
        assertEquals("", packageCanonicalName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWrapperToPrimitiveReturningClassWhereIsSyntheticIsFalse() throws Throwable  {
        // No Comments were added
        Class<Character> arg0 = Character.class;
        Class<?> wrapperToPrimitive = ClassUtils.wrapperToPrimitive(arg0);
        assertEquals(1041, wrapperToPrimitive.getModifiers());
    }
  }
  