content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 10:04:02 GMT 2024
   */
  
  package de.devcity.parseargs;
  
  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 de.devcity.parseargs.ArgsParser;
  import de.devcity.parseargs.arguments.ParameterArgument;
  import de.devcity.parseargs.arguments.StringArgument;
  import de.devcity.parseargs.arguments.SwitchArgument;
  import java.util.List;
  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 ArgsParser_Original_ESTest extends ArgsParser_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsCountReturningPositive() throws Throwable  {
        String[] arg0 = new String[5];
        ArgsParser argsParser = new ArgsParser(arg0);
        int argsCount = argsParser.getArgsCount();
        assertEquals(5, argsCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsReturningEmptyArray() throws Throwable  {
        String[] arg0 = new String[0];
        ArgsParser argsParser = new ArgsParser(arg0);
        String[] args = argsParser.getArgs();
        assertNotSame(args, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseStringArgumentReturningListWhereIsEmptyIsFalse() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[1] = "--";
        argsParser.setArgs(arg0);
        List<StringArgument> parseStringArgument = argsParser.parseStringArgument();
        assertEquals(0, argsParser.getArgsLeftCount());
        assertFalse(parseStringArgument.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseStringArgumentReturningListWhereIsEmptyIsTrue() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        argsParser.setArgs(arg0);
        List<StringArgument> parseStringArgument = argsParser.parseStringArgument();
        assertTrue(parseStringArgument.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningParameterArgumentWhereGetPositionIsPositive0() throws Throwable  {
        String[] arg0 = new String[6];
        arg0[1] = "-l2Fz%'XI`VK\"Qr{ u";
        ArgsParser argsParser = new ArgsParser(arg0);
        ParameterArgument parseParameterArgument = argsParser.parseParameterArgument("l");
        assertNotNull(parseParameterArgument);
        assertEquals(0, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentReturningParameterArgumentWhereGetPositionIsZero() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[0] = "-{-6<";
        arg0[1] = "--";
        argsParser.setArgs(arg0);
        ParameterArgument parseParameterArgument = argsParser.parseParameterArgument("<");
        assertEquals(1, argsParser.getArgsLeftCount());
        assertNotNull(parseParameterArgument);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningParameterArgumentWhereGetPositionIsPositive1() throws Throwable  {
        String[] arg0 = new String[25];
        arg0[6] = "-<";
        arg0[7] = "-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        ParameterArgument parseParameterArgument = argsParser.parseParameterArgument("<");
        assertNotNull(parseParameterArgument);
        assertEquals(0, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentAndParseParameterArgumentWithNonEmptyString0() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[6] = "-{-6<";
        argsParser.setArgs(arg0);
        argsParser.parseParameterArgument("<");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningNull0() throws Throwable  {
        String[] arg0 = new String[7];
        arg0[6] = "-,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseParameterArgument("<");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningParameterArgumentWhereGetPositionIsPositive2() throws Throwable  {
        String[] arg0 = new String[6];
        arg0[1] = "-l2Fz%'XI`VK\"Qr{ u";
        ArgsParser argsParser = new ArgsParser(arg0);
        ParameterArgument parseParameterArgument = argsParser.parseParameterArgument(" ");
        assertNotNull(parseParameterArgument);
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningNull1() throws Throwable  {
        String[] arg0 = new String[4];
        arg0[3] = "---,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseParameterArgument(" ");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentAndParseParameterArgumentWithEmptyString0() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[6];
        arg0[3] = "de.devcity.parseargs.arguments.KeyArgument";
        argsParser.setArgs(arg0);
        argsParser.parseParameterArgument("");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentAndParseParameterArgumentWithEmptyString1() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[6];
        arg0[5] = "";
        argsParser.setArgs(arg0);
        argsParser.parseParameterArgument("");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningNull2() throws Throwable  {
        String[] arg0 = new String[4];
        arg0[2] = "-,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseParameterArgument(" ");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentReturningParameterArgumentWhereIsLongKeyIsTrue() throws Throwable  {
        String[] arg0 = new String[5];
        arg0[0] = "---,-<";
        arg0[1] = "---,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        ParameterArgument parseParameterArgument = argsParser.parseParameterArgument("-,-<");
        assertNotNull(parseParameterArgument);
        assertEquals(0, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningNull3() throws Throwable  {
        String[] arg0 = new String[5];
        arg0[1] = "---,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseParameterArgument("-,-<");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseParameterArgumentAndParseParameterArgumentWithNonEmptyString1() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[1] = "--";
        argsParser.setArgs(arg0);
        argsParser.parseParameterArgument("-{-6<");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndParseParameterArgumentAndParseParameterArgumentReturningNull4() throws Throwable  {
        String[] arg0 = new String[4];
        arg0[3] = "---,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseParameterArgument("-,-<");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgumentAndParseSwitchArgumentReturningSwitchArgumentWhereGetPositionIsPositive() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[6] = "-{-6<";
        argsParser.setArgs(arg0);
        SwitchArgument parseSwitchArgument = argsParser.parseSwitchArgument("-");
        assertTrue(parseSwitchArgument.isSet());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndCallsParseSwitchArgument0() throws Throwable  {
        String[] arg0 = new String[4];
        arg0[2] = "-,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        argsParser.parseSwitchArgument(" ");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgument0() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[1] = "--";
        argsParser.setArgs(arg0);
        argsParser.parseSwitchArgument("-");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgument1() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[6];
        arg0[3] = "de.devcity.parseargs.arguments.KeyArgument";
        argsParser.setArgs(arg0);
        argsParser.parseSwitchArgument("-");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgument2() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[6];
        arg0[5] = "";
        argsParser.setArgs(arg0);
        argsParser.parseSwitchArgument("-");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgumentReturningSwitchArgumentWhereGetPositionIsZero() throws Throwable  {
        String[] arg0 = new String[20];
        arg0[0] = "-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        SwitchArgument parseSwitchArgument = argsParser.parseSwitchArgument("<");
        assertTrue(parseSwitchArgument.isSet());
        assertEquals(0, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testParseSwitchArgumentAndParseSwitchArgumentReturningSwitchArgumentWhereIsLongKeyIsTrue() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] arg0 = new String[8];
        arg0[0] = "-{-6<";
        argsParser.setArgs(arg0);
        argsParser.parseSwitchArgument("313q");
        assertEquals(1, argsParser.getArgsLeftCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesArgsParserTakingStringArrayAndCallsParseSwitchArgument1() throws Throwable  {
        String[] arg0 = new String[6];
        arg0[2] = "---,-<";
        ArgsParser argsParser = new ArgsParser(arg0);
        SwitchArgument parseSwitchArgument = argsParser.parseSwitchArgument("-,-<");
        assertEquals(0, argsParser.getArgsLeftCount());
        assertEquals(2, parseSwitchArgument.getPosition());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsLeftCountReturningPositive() throws Throwable  {
        String[] arg0 = new String[7];
        arg0[0] = "";
        ArgsParser argsParser = new ArgsParser(arg0);
        int argsLeftCount = argsParser.getArgsLeftCount();
        assertEquals(1, argsLeftCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsLeftCountReturningZero() throws Throwable  {
        String[] arg0 = new String[7];
        ArgsParser argsParser = new ArgsParser(arg0);
        int argsLeftCount = argsParser.getArgsLeftCount();
        assertEquals(0, argsLeftCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsReturningNonEmptyArray() throws Throwable  {
        String[] arg0 = new String[3];
        ArgsParser argsParser = new ArgsParser(arg0);
        String[] args = argsParser.getArgs();
        assertNotSame(arg0, args);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetArgsThrowsNullPointerException() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        // Undeclared exception!
        try { 
          argsParser.setArgs((String[]) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // args[] cannot be null.
           //
           verifyException("de.devcity.parseargs.ArgsParser", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsReturningNull() throws Throwable  {
        ArgsParser argsParser = new ArgsParser();
        String[] args = argsParser.getArgs();
        assertNull(args);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgsCountReturningZero() throws Throwable  {
        String[] arg0 = new String[0];
        ArgsParser argsParser = new ArgsParser(arg0);
        int argsCount = argsParser.getArgsCount();
        assertEquals(0, argsCount);
    }
  }
  