content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 08:13:20 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 java.io.IOException;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import wheel.asm.Attribute;
  import wheel.asm.ClassReader;
  import wheel.asm.ClassVisitor;
  import wheel.asm.ClassWriter;
  import wheel.asm.Label;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ClassReader_ESTest extends ClassReader_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadLabelThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        Label[] arg1 = new Label[3];
        // Undeclared exception!
        try { 
          classReader.readLabel(88, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadShortReturningNegative() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        short readShort = classReader.readShort(2);
        assertEquals(8070, classReader.header);
        assertEquals((short) (-17730), readShort);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadLongReturningPositive() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        long readLong = classReader.readLong(8);
        assertEquals(202110031297095690L, readLong);
        assertEquals(8070, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadIntReturningNegative() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        int readInt = classReader.readInt(2);
        assertEquals((-1161953280), readInt);
        assertEquals(1512, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstReturningNonNull() throws Throwable  {
        // No Comments were added
        ClassWriter arg0 = new ClassWriter((-25));
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        assertEquals(1512, classReader.header);
        
        classReader.accept((ClassVisitor) arg0, 8);
        char[] arg1 = new char[1];
        Object readConst = classReader.readConst(42, arg1);
        assertEquals("Ljava/io/File;", readConst);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassReaderTakingByteArray() throws Throwable  {
        byte[] arg0 = new byte[10];
        ClassReader classReader = new ClassReader(arg0);
        
        // When: The readByte method is called on the ClassReader object with an index of 2
        int readByte = classReader.readByte(2);
        
        // Then: Assert that the returned value is equal to 0, which represents a null byte in the byte array
        assertEquals(0, readByte);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstWithNull() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        Object readConst = classReader.readConst(185, (char[]) null);
        assertEquals(2, readConst);
        assertEquals(8070, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAcceptTaking3ArgumentsWithNull() throws Throwable  {
        // Given
        ClassReader classReader = new ClassReader("wheel.asm.Type");
        ClassWriter arg0 = new ClassWriter((-3534));
        
        // When
        classReader.accept(arg0, null, 76);
        
        // Then
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadUnsignedShort() throws Throwable  {
        // Given
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        
        // When
        int headerSize = classReader.readUnsignedShort(811);
        int readHeader = classReader.header;
        
        // Then
        assertEquals(8070, readHeader);
        assertEquals(13, headerSize);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadClass() throws Throwable  {
        // Setup
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        char[] arg1 = new char[9];
        
        // Execute
        String readClass = classReader.readClass(85, arg1);
        
        // Verify
        assertEquals(1512, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadIntReturningPositive() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("java/lang/String");
        int readInt = classReader.readInt((short)401);
        assertEquals(6892, classReader.header);
        assertEquals(25167617, readInt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstThrowsArrayIndexOutOfBoundsException0() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[1];
        // Undeclared exception!
        try { 
          classReader.readConst(170, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 1
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadUTF8ThrowsArrayIndexOutOfBoundsException0() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[2];
        // Undeclared exception!
        try { 
          classReader.readUTF8(717, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 2
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstThrowsArrayIndexOutOfBoundsException1() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[9];
        // Undeclared exception!
        try { 
          classReader.readConst(336, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 9
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadUTF8ThrowsArrayIndexOutOfBoundsException1() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[3];
        // Undeclared exception!
        try { 
          classReader.readUTF8(6, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 3
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadUTF8ThrowsArrayIndexOutOfBoundsException2() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.Type");
        char[] arg1 = new char[9];
        // Undeclared exception!
        try { 
          classReader.readUTF8(141, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 9
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstThrowsArrayIndexOutOfBoundsException2() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[2];
        // Undeclared exception!
        try { 
          classReader.readConst(76, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 2
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadConstThrowsArrayIndexOutOfBoundsException3() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        char[] arg1 = new char[1];
        // Undeclared exception!
        try { 
          classReader.readConst(654, arg1);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 1
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAcceptTaking3ArgumentsThrowsTooManyResourcesException0() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        ClassWriter arg0 = new ClassWriter(170);
        Attribute[] arg1 = new Attribute[1];
        // Undeclared exception!
        classReader.accept((ClassVisitor) arg0, arg1, 40);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAcceptTaking3ArgumentsThrowsTooManyResourcesException1() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        ClassWriter arg0 = new ClassWriter(170);
        Attribute[] arg1 = new Attribute[1];
        // Undeclared exception!
        classReader.accept((ClassVisitor) arg0, arg1, 2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAcceptTaking3ArgumentsWithEmptyArray() throws Throwable  {
        // Given
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        ClassWriter arg0 = new ClassWriter(12);
        Attribute[] arg1 = new Attribute[0];
        
        // When
        classReader.accept((ClassVisitor) arg0, arg1, 12);
        
        // Then
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateClassReaderTakingStringThrowsIOException() throws Throwable  {
        // No Comments were added
        ClassReader classReader = null;
        try {
          classReader = new ClassReader("com.example.TestClassWithMoreFields");
          fail("Expecting exception: IOException");
        
        } catch(Throwable e) {
           //
           // Class not found
           //
           verifyException("wheel.asm.ClassReader", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInterfacesReturningNonEmptyArray() throws Throwable  {
        // Given
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        
        // When
        String[] interfaces = classReader.getInterfaces();
        
        // Then
        assertEquals(1, interfaces.length);
        assertEquals("org.apache.commons.io.filefilter.IOFileFilter", interfaces[0]);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInterfacesReturningEmptyArray() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        String[] interfaces = classReader.getInterfaces();
        assertEquals(8070, classReader.header);
        assertEquals(0, interfaces.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSuperName() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        assertEquals(8070, classReader.header);
        
        String superName = classReader.getSuperName();
        assertNotNull(superName);
        assertEquals("java/lang/Object", superName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassName() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        assertEquals(1512, classReader.header);
        
        String className = classReader.getClassName();
        assertEquals("org/apache/commons/io/filefilter/OrFileFilter", className);
        assertNotNull(className);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadLongReturningNegative() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        long readLong = classReader.readLong(2);
        assertEquals((-4990551337076850593L), readLong);
        assertEquals(1512, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadByteReturningPositive() throws Throwable  {
        // Arrange
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        
        // Act
        int readByte = classReader.readByte(1456);
        
        // Assert
        assertEquals(8070, classReader.header);
        assertEquals(50, readByte);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetItem() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("wheel.asm.ClassReader");
        int item = classReader.getItem(170);
        assertEquals(778, item);
        assertEquals(8070, classReader.header);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAccess() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("org.apache.commons.io.filefilter.OrFileFilter");
        int access = classReader.getAccess();
        assertEquals(33, access);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAcceptTaking2Arguments() throws Throwable  {
        // No Comments were added
        ClassReader classReader = new ClassReader("wheel.asm.Type");
        ClassWriter arg0 = new ClassWriter(141);
        classReader.accept((ClassVisitor) arg0, 248);
        assertEquals(33, classReader.getAccess());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadShortReturningPositive() throws Throwable  {
        // rollbacked to evosuite
        ClassReader classReader = new ClassReader("java/lang/String");
        short readShort = classReader.readShort(491);
        assertEquals(6892, classReader.header);
        assertEquals((short)401, readShort);
    }
  }
  