content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 08:28:34 GMT 2024
   */
  
  package wheel.asm;
  
  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 org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import wheel.asm.ClassReader;
  import wheel.asm.ClassWriter;
  import wheel.asm.Item;
  import wheel.asm.MethodVisitor;
  import wheel.asm.MethodWriter;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ClassWriter_Original_ESTest extends ClassWriter_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitWithNonEmptyArray() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(44);
        String[] arg5 = new String[2];
        arg5[0] = "$K8C_&jc&f*Lww7U";
        arg5[1] = "$K8C_&jc&f*Lww7U";
        classWriter.visit((byte)21, 23, "$K8C_&jc&f*Lww7U", "$K8C_&jc&f*Lww7U", "$K8C_&jc&f*Lww7U", arg5);
        classWriter.invalidFrames = true;
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(70, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetMergedTypeThrowsRuntimeException() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(69);
        classWriter.addUninitializedType("", 69);
        classWriter.addType("4FZra+v[ZD/^5J");
        // Undeclared exception!
        try { 
          classWriter.getMergedType(1, 2);
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // java.lang.ClassNotFoundException: 
           //
           verifyException("wheel.asm.ClassWriter", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCommonSuperClassThrowsRuntimeException() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(3129);
        // Undeclared exception!
        try { 
          classWriter.getCommonSuperClass("java/lang/Object", "");
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // java.lang.ClassNotFoundException: 
           //
           verifyException("wheel.asm.ClassWriter", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewUTF8ReturningPositive() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(16777225);
        int newUTF8 = classWriter.newUTF8("value ");
        assertEquals(1, newUTF8);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewUTF8ReturningNegative() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1445);
        classWriter.index = (-3215);
        int newUTF8 = classWriter.newUTF8("Deprecated");
        assertEquals((-3215), newUTF8);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewNameTypeReturningNegative() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1445);
        classWriter.index = (-2127);
        int newNameType = classWriter.newNameType("", "HSJA[0");
        assertEquals((-2125), newNameType);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewClassItem() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-6291));
        Item newClassItem = classWriter.newClassItem("`");
        assertNotNull(newClassItem);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewClassReturningNegative() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1445);
        classWriter.index = (-2127);
        int newClass = classWriter.newClass("hr[-BSk~S0U+R?(INs");
        assertEquals((-2126), newClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewNameType() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1445);
        int newNameType = classWriter.newNameType("", "HSJA[0");
        assertEquals(3, newNameType);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewClassReturningPositive() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1445);
        int newClass = classWriter.newClass("hr[-BSk~S0U+R?(INs");
        assertEquals(2, newClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCommonSuperClassReturningNonEmptyString() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(685);
        String commonSuperClass = classWriter.getCommonSuperClass("wheel.asm.ClassWriter", "org.apache.commons.io.filefilter.AbstractFileFilter");
        assertEquals("java/lang/Object", commonSuperClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCommonSuperClassWithNonEmptyString0() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(54);
        String commonSuperClass = classWriter.getCommonSuperClass("java/lang/Object", "java/lang/Object");
        assertEquals("java/lang/Object", commonSuperClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCommonSuperClassWithNonEmptyString1() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-8));
        String commonSuperClass = classWriter.getCommonSuperClass("org.apache.commons.io.filefilter.AbstractFileFilter", "java/lang/Object");
        assertEquals("java/lang/Object", commonSuperClass);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUninitializedTypeWithNonEmptyString() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(54);
        Item[] itemArray = new Item[1];
        classWriter.typeTable = itemArray;
        int addUninitializedType = classWriter.addUninitializedType("AAAAAAAAAAAAAAAABCKLLDDDDDEEEEEEEEEEEEEEEEEEEEAAAAAAAADDDDDEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAIIIIIIIIIIIIIIIIDNOAAAAAAGGGGGGGHAFBFAAFFAAQPIIJJIIIIIIIIIIIIIIIIII", 54);
        assertEquals(1, addUninitializedType);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddTypeWithEmptyString() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(69);
        classWriter.addType("");
        int addType = classWriter.addType("");
        assertEquals(1, addType);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewMethodItem() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(1841);
        classWriter.newMethodItem("oZH6)", "", "", false);
        int newNameType = classWriter.newNameType("", "");
        assertEquals(4, newNameType);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewConstItem() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-3354));
        Character arg0 = new Character('D');
        Item newConstItem = classWriter.newConstItem(arg0);
        assertNotNull(newConstItem);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToByteArrayThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(44);
        classWriter.invalidFrames = true;
        // Undeclared exception!
        try { 
          classWriter.toByteArray();
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitInnerClassWithNegative() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-2065));
        classWriter.visitInnerClass("wheel.asm.ClassAdapter", "nxhZWu|y#?.|7,", "nxhZWu|y#?.|7,", (-2065));
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(104, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitWithNegative() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-3354));
        String[] arg5 = new String[0];
        classWriter.visit((-1848), (-3354), "\"Bp:B_", "u~1>FLm>}uv`N1", "X", arg5);
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(99, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisit() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-1190));
        String[] arg5 = new String[0];
        classWriter.visit(1, (-1190), "", "", "", arg5);
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(87, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToByteArray() throws Throwable  {
        ClassWriter arg0 = new ClassWriter(54);
        String[] arg5 = new String[0];
        MethodWriter methodWriter = new MethodWriter(arg0, 54, "Tzn;5C,Yx)Wjjiy", "Tzn;5C,Yx)Wjjiy", "Tzn;5C,Yx)Wjjiy", arg5, true, true);
        byte[] byteArray = arg0.toByteArray();
        assertEquals(70, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitInnerClassWithNullAndNull() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(12);
        classWriter.visitInnerClass((String) null, (String) null, (String) null, 12);
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitInnerClassWithEmptyString() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(48);
        classWriter.visitInnerClass("", "", "", 48);
        classWriter.visitInnerClass("", (String) null, "SourceFile", 1);
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitAnnotationWithNonEmptyStringAndTrue() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(32);
        classWriter.visitAnnotation("java/lang/Object", true);
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(83, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitAnnotationWithEmptyStringAndFalse() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(53);
        classWriter.visitAnnotation("", false);
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(69, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitOuterClass() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-105));
        classWriter.visitOuterClass("wheel.asm.ClassWriter", "wheel.asm.ClassWriter", "wheel.asm.ClassWriter");
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(84, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitOuterClassWithNullAndNonEmptyString0() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(32);
        classWriter.visitOuterClass("W{+`p<M\"en", "%R\u0001+}UQy88c^~d~v:s", (String) null);
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitOuterClassWithNullAndNonEmptyString1() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(33);
        classWriter.visitOuterClass("value ", (String) null, "value ");
        assertEquals(2, ClassWriter.COMPUTE_FRAMES);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitSourceWithNonEmptyString() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(6);
        classWriter.visitSource("w~x-q~tWnuBoQb", "w~x-q~tWnuBoQb");
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(105, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitSource() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-3354));
        classWriter.visitSource("RZ|xw!o\"mb*u 7", (String) null);
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(62, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitSourceWithNull() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(3);
        classWriter.visitSource((String) null, (String) null);
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitWithNull() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(64);
        String[] arg5 = new String[0];
        classWriter.visit(46, 46, "", "", (String) null, arg5);
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitWithNullAndNull() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(864);
        classWriter.visit(2136, 2136, "", (String) null, "", (String[]) null);
        assertEquals(2, ClassWriter.COMPUTE_FRAMES);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewConstThrowsIllegalArgumentException() throws Throwable  {
        ClassWriter arg0 = new ClassWriter(32);
        // Undeclared exception!
        try { 
          arg0.newConst(arg0);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // value wheel.asm.ClassWriter@5
           //
           verifyException("wheel.asm.ClassWriter", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitEnd() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(685);
        classWriter.visitEnd();
        assertEquals(1, ClassWriter.COMPUTE_MAXS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitMethod() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(2348);
        MethodVisitor visitMethod = classWriter.visitMethod(0, "", "", "", (String[]) null);
        assertNotNull(visitMethod);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewMethod() throws Throwable  {
        ClassWriter classWriter = new ClassWriter((-2370));
        classWriter.newMethod("", "", "", true);
        int newMethod = classWriter.newMethod("", "", "", true);
        assertEquals(4, newMethod);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassWriterTaking2Arguments() throws Throwable  {
        ClassReader arg0 = new ClassReader("wheel.asm.ClassWriter");
        ClassWriter classWriter = new ClassWriter(arg0, 1986);
        int newConst = classWriter.newConst("wheel.asm.ClassWriter");
        assertEquals(641, newConst);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testVisitField() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(3129);
        classWriter.visitField(1, "M(", "M(", "(F,b%xV>]g_$V4UCL", "M(");
        byte[] byteArray = classWriter.toByteArray();
        assertEquals(106, byteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testNewField() throws Throwable  {
        ClassWriter classWriter = new ClassWriter(127);
        int newField = classWriter.newField("org.apache.commons.io.IOCase", "org.apache.commons.io.IOCase", "org.apache.commons.io.IOCase");
        assertEquals(4, newField);
    }
  }
  