content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 10:59:19 GMT 2024
   */
  
  package edu.mscd.cs.jclo;
  
  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 edu.mscd.cs.jclo.JCLO;
  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 JCLO_ESTest extends JCLO_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsReturningNull() throws Throwable  {
        // Given a JCLO object with the "-JZ" flag
        JCLO jCLO = new JCLO("-JZ", "-JZ");
        
        // When we call getChars with the "-JZ" flag as an argument
        char[] chars = jCLO.getChars("-JZ");
        
        // Then the method should return null
        assertNull(chars);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetByteReturningPositive() throws Throwable  {
        // Test that JCLO returns the correct maximum value for byte values
        Byte minValue = new Byte((byte) (-98));
        JCLO jCLO = new JCLO(minValue);
        byte maxValue = jCLO.getByte("MAX_VALUE");
        assertEquals((byte)127, maxValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetByteReturningNegative() throws Throwable  {
        // Test to ensure that the MIN_VALUE of Byte is correctly retrieved
        Byte minValue = new Byte((byte) (-123));
        JCLO jCLO = new JCLO("", minValue);
        byte byteVal = jCLO.getByte("MIN_VALUE");
        assertEquals(Byte.MIN_VALUE, byteVal);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBoolean() throws Throwable  {
        // Given a JCLO object with a double-dash argument
        JCLO arg0 = new JCLO("f", "f");
        JCLO jCLO = new JCLO(arg0);
        
        // When the boolean value of the double-dashes is retrieved
        boolean _boolean = jCLO.getBoolean("doubleDashes");
        
        // Then the value should be false
        assertFalse(_boolean);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningNull() throws Throwable  {
        // This test checks that the "getValue" method returns null when passed a non-existent key.
        Byte arg0 = new Byte((byte) (-64));
        JCLO jCLO = new JCLO(arg0);
        Object value = jCLO.getValue("r");
        assertNull(value);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningNonNull() throws Throwable  {
        // Given a JCLO object with a Byte type argument
        Byte arg0 = new Byte((byte) (-37));
        JCLO jCLO = new JCLO(arg0);
        
        // When the TYPE value is retrieved from the JCLO object
        Class value = (Class)jCLO.getValue("TYPE");
        
        // Then the value should not be an enum type
        assertFalse(value.isEnum());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMain0() throws Throwable  {
        // rollbacked to evosuite
        String[] arg0 = new String[1];
        arg0[0] = "--version";
        JCLO.main(arg0);
        assertEquals(1, arg0.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMain1() throws Throwable  {
        // Given
        String[] args = new String[1];
        args[0] = "Hello World!";
        
        // When
        JCLO.main(args);
        
        // Then
        assertEquals(1, args.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMainWithEmptyArray() throws Throwable  {
        // No Comments were added
        String[] arg0 = new String[0];
        JCLO.main(arg0);
        assertEquals(0, arg0.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsIllegalArgumentException0() throws Throwable  {
        // Test that the MIN_VALUE option requires a value to be specified after the "=" sign.
        Byte arg1 = new Byte((byte) (-102));
        JCLO jCLO = new JCLO("MIN_VALUE", arg1);
        String[] arg0 = new String[8];
        arg0[0] = "--";
        // Undeclared exception!
        try {
        // Parse the input arguments using the JCLO class.
        jCLO.parse(arg0);
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // '--' requires '=VALUE'
        //
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsNumberFormatException0() throws Throwable  {
        // Given
        Byte negativeByte = new Byte((byte) -82);
        JCLO jclo = new JCLO("serialVersionUID", negativeByte);
        String[] input = new String[8];
        input[0] = "-";
        
        // When
        try {
        jclo.parse(input);
        fail("Expecting exception: NumberFormatException");
        } catch (NumberFormatException e) {
        
        // Then
        verifyException("java.lang.Long", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsNumberFormatException1() throws Throwable  {
        // rollbacked to evosuite
        Byte arg1 = new Byte((byte)1);
        JCLO jCLO = new JCLO("BYTES", arg1);
        String[] arg0 = new String[9];
        arg0[0] = "-";
        // Undeclared exception!
        try { 
          jCLO.parse(arg0);
          fail("Expecting exception: NumberFormatException");
        
        } catch(NumberFormatException e) {
           //
           // null
           //
           verifyException("java.lang.Integer", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsNumberFormatException2() throws Throwable  {
        Byte arg1 = new Byte((byte) (-123));
        JCLO jCLO = new JCLO("MIN_VALUE", arg1);
        String[] arg0 = new String[9];
        arg0[0] = "-";
        try {
        jCLO.parse(arg0);
        fail("Expecting exception: NumberFormatException");
        } catch (NumberFormatException e) {
        // Expected behavior, invalid input
        verifyException("java.lang.Integer", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsNullPointerException() throws Throwable  {
        // rollbacked to evosuite
        Object arg1 = new Object();
        String[][] arg2 = new String[5][4];
        String[] stringArray = new String[6];
        stringArray[0] = "";
        arg2[0] = stringArray;
        String[] arg0 = new String[6];
        arg0[0] = "-";
        JCLO jCLO = new JCLO("", arg1, arg2);
        // Undeclared exception!
        try { 
          jCLO.parse(arg0);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesJCLOTaking3Arguments() throws Throwable  {
        // Test that the parse method can handle a string array with length 2 and a negative byte value
        Byte arg1 = new Byte((byte) (-27));
        String[][] arg2 = new String[2][0];
        String[] arg0 = new String[2];
        arg2[0] = arg0;
        arg0[0] = "-";
        arg2[1] = arg0;
        JCLO jCLO = new JCLO("TYPE", arg1, arg2);
        jCLO.parse(arg0);
        assertEquals(2, arg0.length);
        // Test that the parse method can handle a string array with length 2 and a negative byte value
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseThrowsIllegalArgumentException1() throws Throwable  {
        // rollbacked to evosuite
        JCLO jCLO = new JCLO("-s?PWjzO=#", "-s?PWjzO=#");
        String[] arg0 = new String[1];
        arg0[0] = "-s?PWjzO=#";
        // Undeclared exception!
        try { 
          jCLO.parse(arg0);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // No such option: \"?PWjzO\"
           //
           verifyException("edu.mscd.cs.jclo.JCLO", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParse() throws Throwable  {
        // Arrange
        JCLO jclo = new JCLO("BYTES", "BYTES");
        String[] args = new String[9];
        args[0] = "127";
        
        // Act
        jclo.parse(args);
        
        // Assert
        assertEquals(9, args.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testUsageReturningEmptyString() throws Throwable  {
        // Given a JCLO object with two arguments
        JCLO jclo = new JCLO("2", "2");
        
        // When the usage method is called on the JCLO object
        String usage = jclo.usage();
        
        // Then the returned value should be an empty string
        assertEquals("", usage);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesJCLOTakingObject() throws Throwable  {
        // Given a JCLO object with two arguments
        JCLO arg0 = new JCLO("2", "2");
        JCLO jCLO = new JCLO(arg0);
        
        // When the usage method is called on the JCLO object
        String usage = jCLO.usage();
        
        // Then the returned usage string should include certain options and arguments
        assertEquals("-aliases String;...\n-doubleDashes\n-fields Field...\n-hasEquals\n-object Object\n-prefix String\n", usage);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testUsage() throws Throwable  {
        // Create a new instance of the JCLO class with empty strings for the arguments
        JCLO jCLO = new JCLO("", "");
        
        // Call the usage method and store the returned value in a variable
        String usage = jCLO.usage();
        
        // Assert that the usage string starts with "-hash int"
        assertEquals("-hash int\n", usage);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningNonEmptyString() throws Throwable  {
        // Given a JCLO instance created with a Byte value of 11
        Byte arg0 = new Byte((byte) 11);
        JCLO jCLO = new JCLO(arg0);
        
        // When the toString method is called on the JCLO instance
        String string = jCLO.toString();
        
        // Then the result should be a String representation of the JCLO object, including its attributes and values
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningEmptyString() throws Throwable  {
        // Given a JCLO object, we want to ensure that its toString() method returns an empty string.
        Object arg0 = new Object();
        JCLO jCLO = new JCLO(arg0);
        String expectedOutput = "";
        
        // When we call the toString() method on the JCLO object, we expect it to return an empty string.
        String actualOutput = jCLO.toString();
        
        // Then we assert that the output of the toString() method is equal to our expected output.
        assertEquals(expectedOutput, actualOutput);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringThrowsClassCastException() throws Throwable  {
        // Given: an instance of JCLO with a invalid input "dN$"
        JCLO jCLO = new JCLO("dN$");
        
        // When: calling the toString method
        try {
        jCLO.toString();
        
        // Then: an exception is thrown
        fail("Expecting exception: ClassCastException");
        
        } catch(ClassCastException e) {
        // Verify that the exception is expected
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBytes() throws Throwable  {
        // Given a JCLO object with the "SIZE" argument
        JCLO jCLO = new JCLO("SIZE");
        
        // When we call getBytes() on this object with the "SIZE" argument
        byte[] bytes = jCLO.getBytes("SIZE");
        
        // Then the returned byte array should be null
        assertNull(bytes);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLongs() throws Throwable  {
        // Given a JCLO instance with a non-existent key
        JCLO jclo = new JCLO("d4additional");
        
        // When we call the getLongs method for this key
        long[] longs = jclo.getLongs("d4additional");
        
        // Then the returned array should be null
        assertNull(longs);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShortThrowsNullPointerException() throws Throwable  {
        JCLO jCLO = new JCLO(")VD<Afb-2vr&=jk$Ix|value");
        
        // Given a value that is not null or empty
        assertNotNull(jCLO.getShort(")VD<Afb-2vr&=jk$Ix|value"));
        
        try {
        jCLO.getShort(")VD<Afb-2vr&=jk$Ix|value");
        fail("Expected exception: NullPointerException");
        } catch (NullPointerException e) {
        // When the value is null or empty
        assertTrue(e instanceof NullPointerException);
        
        // Then a NullPointerException should be thrown
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFloats() throws Throwable  {
        // Set up a new instance of JCLO with the given string argument "f"
        JCLO jCLO = new JCLO("f");
        
        // Retrieve an array of floats from the JCLO object using the getFloats method
        float[] floats = jCLO.getFloats("f");
        
        // Assert that the returned value is null, as there are no floats in the string "f"
        assertNull(floats);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetStrings() throws Throwable  {
        // Given: A JCLO object with an empty string as input
        JCLO jclo = new JCLO("");
        
        // When: The getStrings method is called with an empty string as input
        String[] strings = jclo.getStrings("");
        
        // Then: The returned array should be null
        assertNull(strings);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFloatThrowsNullPointerException() throws Throwable  {
        JCLO jCLO = new JCLO("d");
        
        try {
        // Try to get a float value from the "d" key, which is null
        jCLO.getFloat("d");
        
        // We expect an exception to be thrown, but it didn't happen
        fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        // Verify that the exception message is null (getMessage() returned null)
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDoubleThrowsNullPointerException() throws Throwable  {
        JCLO jCLO = new JCLO(")VD<Afb-2vr&=jk$Ix|value");
        // Given an invalid input string for the getDouble method
        
        try {
        jCLO.getDouble(")VD<Afb-2vr&=jk$Ix|value");
        fail("Expecting exception: NullPointerException");
        } catch (NullPointerException e) {
        // When an invalid input string is passed to the getDouble method
        
        // Then a NullPointerException is thrown with no message in the exception object
        
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesJCLOTaking2Arguments() throws Throwable  {
        // No Comments were added
        Object arg0 = new Object();
        String[][] arg1 = new String[0][0];
        JCLO jCLO = new JCLO(arg0, arg1);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDoubles() throws Throwable  {
        // Test that the getDoubles method returns null when passed a null input
        JCLO jCLO = new JCLO("BYTES", "BYTES");
        double[] doubles = jCLO.getDoubles("BYTES");
        assertNull(doubles);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsReturningEmptyArray() throws Throwable  {
        // Given
        JCLO jclo = new JCLO("", "");
        
        // When
        char[] chars = jclo.getChars("value");
        
        // Then
        assertEquals(0, chars.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetShorts() throws Throwable  {
        // Arrange
        Byte arg0 = new Byte((byte) (-64));
        JCLO jCLO = new JCLO(arg0);
        
        // Act
        short[] shorts = jCLO.getShorts("mgtX1x6WMlzi.cg1");
        
        // Assert
        assertNull(shorts);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInt() throws Throwable  {
        // Given: A JCLO object with an empty string as input
        JCLO jCLO = new JCLO("", "");
        
        // When: The getInt method is called on the JCLO object with the hash key "hash"
        int _int = jCLO.getInt("hash");
        
        // Then: The returned value should be 0
        assertEquals(0, _int);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetString() throws Throwable  {
        // Given a comma-separated list of strings
        JCLO jCLO = new JCLO(",");
        String stringList = "apple,banana,orange";
        
        // When the method is called with the list of strings
        String resultString = jCLO.getString(stringList);
        
        // Then the method should return a comma-separated string
        assertEquals("apple,banana,orange", resultString);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharThrowsClassCastException() throws Throwable  {
        // Given: A JCLO object with the key "CASE_INSENSITIVE_ORDER"
        JCLO jCLO = new JCLO("CASE_INSENSITIVE_ORDER");
        
        // When: Trying to get a character from the object using the getChar() method
        try {
        jCLO.getChar("CASE_INSENSITIVE_ORDER");
        fail("Expecting exception: ClassCastException");
        } catch(ClassCastException e) {
        // Then: The method should throw a ClassCastException
        verifyException("edu.mscd.cs.jclo.JCLO", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInts() throws Throwable  {
        // Given a JCLO instance with MIN_VALUE and MIN_VALUE as inputs
        JCLO jCLO = new JCLO("MIN_VALUE", "MIN_VALUE");
        
        // When the getInts method is called with "." as an argument
        int[] ints = jCLO.getInts(".");
        
        // Then the result should be null
        assertNull(ints);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLong() throws Throwable  {
        // Given
        JCLO jCLO = new JCLO("");
        
        // When
        long serialVersionUID = jCLO.getLong("serialVersionUID");
        
        // Then
        assertEquals(-6849794470754667710L, serialVersionUID);
    }
  }
  