content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 10:55:54 GMT 2024
   */
  
  package org.apache.commons.cli;
  
  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 java.io.StringWriter;
  import java.util.Comparator;
  import org.apache.commons.cli.HelpFormatter;
  import org.apache.commons.cli.Options;
  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 HelpFormatter_Original_ESTest extends HelpFormatter_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRtrimReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String rtrim = helpFormatter.rtrim("BEb} ,aLD_B2");
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals("BEb} ,aLD_B2", rtrim);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderWrappedTextReturningStringBufferWhereLengthIsZero() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        StringBuffer arg0 = new StringBuffer();
        StringBuffer renderWrappedText = helpFormatter.renderWrappedText(arg0, 1, 10, " ");
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("", renderWrappedText.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderOptionsReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg2 = new Options();
        helpFormatter.renderOptions((StringBuffer) null, 3, arg2, 3, 99);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderOptionsReturningStringBufferWhereLengthIsZero() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        StringBuffer arg0 = new StringBuffer();
        Options arg2 = new Options();
        helpFormatter.renderOptions(arg0, 1032, arg2, 63, 63);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSyntaxPrefixReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        
        helpFormatter.setSyntaxPrefix((String) null);
        String syntaxPrefix = helpFormatter.getSyntaxPrefix();
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertNull(syntaxPrefix);
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOptPrefixReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("-", helpFormatter.getOptPrefix());
        
        helpFormatter.defaultOptPrefix = null;
        String optPrefix = helpFormatter.getOptPrefix();
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertNull(optPrefix);
        assertEquals(1, helpFormatter.defaultLeftPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNewLineReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setNewLine((String) null);
        String newLine = helpFormatter.getNewLine();
        assertEquals("-", helpFormatter.getOptPrefix());
        assertNull(newLine);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLeftPaddingReturningNegative() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.defaultLeftPad = (-1586);
        int leftPadding = helpFormatter.getLeftPadding();
        assertEquals((-1586), leftPadding);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDescPaddingReturningZero() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals(3, helpFormatter.defaultDescPad);
        
        helpFormatter.setDescPadding(0);
        int descPadding = helpFormatter.getDescPadding();
        assertEquals(0, helpFormatter.defaultDescPad);
        assertEquals(0, descPadding);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgNameReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("arg", helpFormatter.getArgName());
        
        helpFormatter.setArgName((String) null);
        String argName = helpFormatter.getArgName();
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertNull(argName);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindWrapPosReturningNegative() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int findWrapPos = helpFormatter.findWrapPos("--", 3, 74);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals((-1), findWrapPos);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePaddingReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String createPadding = helpFormatter.createPadding(74);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("                                                                          ", createPadding);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatePaddingReturningEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String createPadding = helpFormatter.createPadding(0);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("", createPadding);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderWrappedTextReturningStringBufferWhereLengthIsPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        StringBuffer arg0 = new StringBuffer((CharSequence) "arg");
        helpFormatter.renderWrappedText(arg0, 10, 1, "\n");
        assertEquals("arg\n ", arg0.toString());
        assertEquals(5, arg0.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRtrimReturningEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String rtrim = helpFormatter.rtrim("");
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals("", rtrim);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRtrimReturningNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String rtrim = helpFormatter.rtrim((String) null);
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
        assertNull(rtrim);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindWrapPosReturningZero() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int findWrapPos = helpFormatter.findWrapPos(" ]", 0, 0);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(0, findWrapPos);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals(3, helpFormatter.defaultDescPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderOptionsThrowsStringIndexOutOfBoundsException() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg2 = new Options();
        arg2.addOption("", false, "\n");
        StringBuffer arg0 = new StringBuffer("");
        // Undeclared exception!
        try { 
          helpFormatter.renderOptions(arg0, (-610), arg2, 15, 15);
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFindWrapPosReturningPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int findWrapPos = helpFormatter.findWrapPos("\n", 0, 0);
        assertEquals(1, findWrapPos);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking6Arguments() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg3 = new Options();
        helpFormatter.printHelp(44, "The addValue method is not intended for client use. Subclasses should use the addValueForProcessing method instead. ", "I", arg3, "'", true);
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRenderOptionsReturningStringBufferWhereLengthIsPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg2 = new Options();
        arg2.addOption("arg", true, "usage: ");
        StringWriter stringWriter = new StringWriter(8);
        StringBuffer arg0 = stringWriter.getBuffer();
        helpFormatter.renderOptions(arg0, 940, arg2, 940, 1);
        assertEquals(41, arg0.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking3Strings1And1WithTrue() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals(74, helpFormatter.defaultWidth);
        
        Options arg2 = new Options();
        arg2.addOption((String) null, true, (String) null);
        helpFormatter.printHelp("cIj?~nqn[{^-0J8", (String) null, arg2, (String) null, true);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetOptionComparatorWithNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setOptionComparator((Comparator) null);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(74, helpFormatter.defaultWidth);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetOptionComparatorWithNonNull() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Comparator<Object> arg0 = (Comparator<Object>) mock(Comparator.class, new ViolatedAssumptionAnswer());
        helpFormatter.setOptionComparator(arg0);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking3Strings1And1WithFalse() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg2 = new Options();
        arg2.addOption("", "", false, "");
        arg2.addOption("arg", false, "usage: ");
        helpFormatter.printHelp("arg", "arg", arg2, "arg", false);
        assertEquals("--", helpFormatter.getLongOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOptPrefixReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String optPrefix = helpFormatter.getOptPrefix();
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", optPrefix);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSyntaxPrefixReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String syntaxPrefix = helpFormatter.getSyntaxPrefix();
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("usage: ", syntaxPrefix);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLongOptPrefixReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String longOptPrefix = helpFormatter.getLongOptPrefix();
        assertEquals("--", longOptPrefix);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking3Arguments() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg1 = new Options();
        helpFormatter.printHelp("aCGJ;)", arg1, true);
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNewLineReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String newLine = helpFormatter.getNewLine();
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("\n", newLine);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(1, helpFormatter.defaultLeftPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDescPaddingReturningNegative() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setDescPadding((-2443));
        int descPadding = helpFormatter.getDescPadding();
        assertEquals((-2443), helpFormatter.defaultDescPad);
        assertEquals((-2443), descPadding);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgNameReturningNonEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        String argName = helpFormatter.getArgName();
        assertEquals("arg", argName);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLeftPaddingReturningPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int leftPadding = helpFormatter.getLeftPadding();
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(1, leftPadding);
        assertEquals(74, helpFormatter.defaultWidth);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetOptPrefix() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("-", helpFormatter.getOptPrefix());
        
        helpFormatter.setOptPrefix("");
        helpFormatter.getOptPrefix();
        assertEquals("", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetWidth() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setWidth((-2551));
        int width = helpFormatter.getWidth();
        assertEquals((-2551), helpFormatter.defaultWidth);
        assertEquals((-2551), width);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking2Arguments() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg1 = new Options();
        helpFormatter.printHelp("opt contains illegal character value '", arg1);
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals(74, helpFormatter.defaultWidth);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking13StringsAnd1() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg3 = new Options();
        helpFormatter.printHelp(13, " ] [ long ", "", arg3, (String) null);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("-", helpFormatter.getOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSyntaxPrefixReturningEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        
        helpFormatter.setSyntaxPrefix("");
        helpFormatter.getSyntaxPrefix();
        assertEquals("", helpFormatter.getSyntaxPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrintHelpTaking4Arguments() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        Options arg2 = new Options();
        helpFormatter.printHelp("-", "-", arg2, "-");
        assertEquals(3, helpFormatter.defaultDescPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetArgNameReturningEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("arg", helpFormatter.getArgName());
        
        helpFormatter.setArgName("");
        helpFormatter.getArgName();
        assertEquals("", helpFormatter.getArgName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetLeftPadding() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setLeftPadding(63);
        assertEquals(63, helpFormatter.defaultLeftPad);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNewLineReturningEmptyString() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.setNewLine("");
        helpFormatter.getNewLine();
        assertEquals("", helpFormatter.getNewLine());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDescPaddingReturningPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int descPadding = helpFormatter.getDescPadding();
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, descPadding);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals(74, helpFormatter.defaultWidth);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetLongOptPrefix() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        assertEquals("--", helpFormatter.getLongOptPrefix());
        
        helpFormatter.setLongOptPrefix("");
        helpFormatter.getLongOptPrefix();
        assertEquals("", helpFormatter.getLongOptPrefix());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetWidthReturningPositive() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        int width = helpFormatter.getWidth();
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals(74, width);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOptionComparator() throws Throwable  {
        HelpFormatter helpFormatter = new HelpFormatter();
        helpFormatter.getOptionComparator();
        assertEquals("usage: ", helpFormatter.getSyntaxPrefix());
        assertEquals(1, helpFormatter.defaultLeftPad);
        assertEquals(3, helpFormatter.defaultDescPad);
        assertEquals("--", helpFormatter.getLongOptPrefix());
        assertEquals("-", helpFormatter.getOptPrefix());
        assertEquals("arg", helpFormatter.getArgName());
        assertEquals(74, helpFormatter.defaultWidth);
    }
  }
  