content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 10:27:18 GMT 2024
   */
  
  package com.jstevh.viewer;
  
  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.shaded.org.mockito.Mockito.*;
  import static org.evosuite.runtime.EvoAssertions.*;
  import com.jstevh.viewer.ClassInfo;
  import com.jstevh.viewer.DirManager;
  import com.jstevh.viewer.MethodData;
  import java.lang.reflect.Array;
  import java.lang.reflect.Member;
  import javax.swing.JFrame;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.evosuite.runtime.ViolatedAssumptionAnswer;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ClassInfo_Original_ESTest extends ClassInfo_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDataTakingClassArray() throws Throwable  {
        Class<JFrame>[] arg0 = (Class<JFrame>[]) Array.newInstance(Class.class, 0);
        String[] data = ClassInfo.getData(arg0);
        assertNull(data);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDataTakingMemberArrayReturningNonEmptyArray() throws Throwable  {
        Member[] arg0 = new Member[1];
        Member member = mock(Member.class, new ViolatedAssumptionAnswer());
        arg0[0] = member;
        String[] data = ClassInfo.getData(arg0);
        assertEquals(1, data.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDataTakingMemberArrayReturningNull() throws Throwable  {
        Member[] arg0 = new Member[0];
        String[] data = ClassInfo.getData(arg0);
        assertNull(data);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintMethodsTakingNoArgumentsReturningNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("java.io.Serializable");
        String[] printMethods = classInfo.printMethods();
        assertNull(printMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassName() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.SAXDirParser");
        String className = classInfo.getClassName();
        assertEquals("com.jstevh.viewer.SAXDirParser", className);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMainThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        String[] arg0 = new String[1];
        arg0[0] = "new";
        try { 
          ClassInfo.main(arg0);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // 1
           //
           verifyException("com.jstevh.viewer.ClassInfo", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMain0() throws Throwable  {
        String[] arg0 = new String[2];
        arg0[0] = "java.lang.Object";
        ClassInfo.main(arg0);
        assertEquals(2, arg0.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMain1() throws Throwable  {
        String[] arg0 = new String[1];
        arg0[0] = "com.jstevh.viewer.ClassInfo$1";
        ClassInfo.main(arg0);
        assertEquals(1, arg0.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateClassInfoTakingStringThrowsNullPointerException() throws Throwable  {
        ClassInfo classInfo = null;
        try {
          classInfo = new ClassInfo((String) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("com.jstevh.viewer.ClassInfo", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintFields() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.SAXDirParser");
        String[] arg1 = classInfo.printFields();
        classInfo.srchMethods("com.jstevh.viewer.SAXDirParser", arg1);
        MethodData foundMethod = classInfo.getFoundMethod(2);
        assertNull(foundMethod);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFoundMethod() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("[J");
        MethodData foundMethod = classInfo.getFoundMethod(1);
        assertNull(foundMethod);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFoundMethodThrowsStringIndexOutOfBoundsException() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] arg1 = classInfo.printFields();
        classInfo.srchMethods("com.jstevh.viewer.ClassInfo", arg1);
        // Undeclared exception!
        try { 
          classInfo.getFoundMethod(2);
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSrchMethodsTaking2ArgumentsWithNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] srchMethods = classInfo.srchMethods((String) null, (String[]) null);
        assertNull(srchMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSrchMethodsTaking2ArgumentsReturningNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] srchMethods = classInfo.srchMethods("com.jstevh.viewer.ClassInfo", (String[]) null);
        assertNull(srchMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSrchMethodsTakingStringReturningNonEmptyArray() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] srchMethods = classInfo.srchMethods("java.lang.reflect.Method@0000000001");
        assertEquals(1, srchMethods.length);
        assertNotNull(srchMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSrchMethodsTakingStringWithNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] srchMethods = classInfo.srchMethods((String) null);
        assertNull(srchMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSrchMethodsTakingString() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] srchMethods = classInfo.srchMethods("com.jstevh.viewer.ClassInfo");
        assertNull(srchMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintInterfacesReturningNonEmptyArray() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("javax.swing.JFrame");
        String[] printInterfaces = classInfo.printInterfaces();
        assertEquals(7, printInterfaces.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsPrintInterfaces0() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("org.xml.sax.ContentHandler");
        String[] printInterfaces = classInfo.printInterfaces();
        assertNull(printInterfaces);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsPrintInterfaces1() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("java.lang.Object");
        String[] printInterfaces = classInfo.printInterfaces();
        assertNull(printInterfaces);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsPrintInterfaces2() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] printInterfaces = classInfo.printInterfaces();
        assertNull(printInterfaces);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintConstructorsReturningNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo$1");
        String[] printConstructors = classInfo.printConstructors();
        assertNull(printConstructors);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintConstructorsReturningNonEmptyArray() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] printConstructors = classInfo.printConstructors();
        assertEquals(2, printConstructors.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintMethodsTakingNoArgumentsReturningNonEmptyArray() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String[] printMethods = classInfo.printMethods();
        assertEquals(25, printMethods.length);
        assertNotNull(printMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMainWithEmptyArray() throws Throwable  {
        String[] arg0 = new String[0];
        ClassInfo.main(arg0);
        assertEquals(0, arg0.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintFieldsReturningNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.tools.StringTools");
        String[] printFields = classInfo.printFields();
        assertNull(printFields);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTaking2Arguments0() throws Throwable  {
        DirManager arg1 = new DirManager(false);
        ClassInfo classInfo = new ClassInfo("java.lang.Object", arg1);
        assertFalse(classInfo.isAbstract());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTaking2Arguments1() throws Throwable  {
        DirManager arg1 = new DirManager(false);
        ClassInfo classInfo = new ClassInfo("java.io.Serializable", arg1);
        assertEquals(1, ClassInfo.NO_OBJECT_METHODS);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateClassInfoTaking2ArgumentsThrowsClassNotFoundException() throws Throwable  {
        DirManager arg1 = new DirManager(false);
        ClassInfo classInfo = null;
        try {
          classInfo = new ClassInfo("<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?><Base><Documentation><Group><Description>Java SDK 6.0</Description><Owner>Sun Microsystems</Owner><Location><Web>http://java.sun.com/javase/6/docs/api/</Web><Local></Local></Location><Names><pkg>java.lang.</pkg><pkg>java.io.</pkg><pkg>java.lang.reflect.</pkg><pkg>java.util.</pkg><pkg>java.awt.event.</pkg><pkg>java.awt.datatransfer.</pkg><pkg>java.awt.</pkg><pkg>java.net.</pkg><pkg>java.applet.</pkg><pkg></pkg><pkg></pkg><pkg></pkg><pkg></pkg></Names></Group><Group><Description>Java Enterprise</Description><Owner>Sun Microsystems</Owner><Location><Web>http://java.sun.com/j2se/1.4.2/docs/api/</Web></Location><Names><pkg>javax.swing.border.</pkg><pkg></pkg><pkg></pkg><pkg></pkg><pkg></pkg></Names></Group></Documentation></Base>", arg1);
          fail("Expecting exception: ClassNotFoundException");
        
        } catch(Throwable e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("com.jstevh.viewer.ClassInfo", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsPrintMethodsTakingInt0() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("java.io.Serializable");
        String[] printMethods = classInfo.printMethods(24);
        assertNull(printMethods);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTaking2ArgumentsAndCallsGetSuperClassName() throws Throwable  {
        DirManager arg1 = new DirManager(false);
        ClassInfo classInfo = new ClassInfo("org.xml.sax.ContentHandler", arg1);
        String superClassName = classInfo.getSuperClassName();
        assertNull(superClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSuperClassNameReturningNonEmptyString() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("[J");
        String superClassName = classInfo.getSuperClassName();
        assertEquals("java.lang.Object", superClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsGetSuperClassName() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("java.lang.Object");
        String superClassName = classInfo.getSuperClassName();
        assertNull(superClassName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassPackageReturningNonEmptyString() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("com.jstevh.viewer.ClassInfo");
        String classPackage = classInfo.getClassPackage();
        assertEquals("com.jstevh.viewer", classPackage);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetClassPackageReturningNull() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("[J");
        String classPackage = classInfo.getClassPackage();
        assertNull(classPackage);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesClassInfoTakingStringAndCallsPrintMethodsTakingInt1() throws Throwable  {
        ClassInfo classInfo = new ClassInfo("[J");
        String[] printMethods = classInfo.printMethods(12);
        assertNull(printMethods);
    }
  }
  