content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 15:59:49 GMT 2024
   */
  
  package org.apache.commons.lang3.text;
  
  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.util.ArrayDeque;
  import java.util.EnumSet;
  import java.util.Iterator;
  import java.util.Locale;
  import java.util.NoSuchElementException;
  import java.util.Stack;
  import org.apache.commons.lang3.text.StrBuilder;
  import org.apache.commons.lang3.text.StrMatcher;
  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 StrBuilder_ESTest extends StrBuilder_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReady() throws Throwable  {
        // Create a new StrBuilder with some initial data
        StrBuilder sb = new StrBuilder("wJW,nQ");
        
        // Verify the capacity and size of the StrBuilder
        assertEquals(39, sb.capacity());
        assertEquals(7, sb.size());
        assertEquals(7, sb.length());
        
        // Create a new StrBuilderReader for the StrBuilder
        StrBuilder.StrBuilderReader reader = sb.new StrBuilderReader();
        
        // Verify that the reader is ready to read data
        boolean ready = reader.ready();
        assertTrue(ready);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        // Given a String Builder object
        StrBuilder strBuilder = new StrBuilder();
        
        // When the hashCode() method is called on the string builder
        strBuilder.hashCode();
        
        // Then the capacity of the string builder should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValidateRangeReturningZero() throws Throwable  {
        // Test that the StrBuilder can validate a range of characters and return an accurate capacity
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.validateRange(0, 753);
        assertEquals(32, strBuilder.capacity());
        
        // This test ensures that the StrBuilder can correctly validate a range of characters and return the correct capacity
        // when the input string is between 0-753 characters long. The expected result is a capacity of 32.
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testValidateRangeReturningPositive() throws Throwable  {
        // Given a string builder with a capacity of 93 and a length of 1
        StrBuilder strBuilder = new StrBuilder("M");
        strBuilder.validateRange(1, 93);
        
        // When the validateRange method is called with a range that overlaps with the existing range
        strBuilder.validateRange(20, 73);
        
        // Then the capacity of the string builder should remain unchanged
        assertEquals(33, strBuilder.capacity());
        
        // And the length of the string builder should be updated to reflect the new range
        assertEquals(42, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTrimReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given a StrBuilder with an initial capacity of 44
        StrBuilder strBuilder = new StrBuilder(44);
        
        // When the capacity is minimized and trimmed
        strBuilder.minimizeCapacity();
        strBuilder.trim();
        
        // Then the resulting StrBuilder has a capacity of 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringBufferReturningStringBufferWhereLengthIsPositive() throws Throwable  {
        // Given an instance of a StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a non-empty string to the StrBuilder
        StringBuilder arg0 = new StringBuilder("org.apache.commons.lang3.ArrayUtils");
        strBuilder.append(arg0);
        
        // Then the isEmpty method should return false
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningEmptyString() throws Throwable  {
        // Given a StrBuilder with initial capacity of 0
        StrBuilder strBuilder = new StrBuilder(0);
        
        // When toString method is called on the StrBuilder
        String string = strBuilder.toString();
        
        // Then the resulting string should be empty
        assertEquals("", string);
        
        // And the capacity of the StrBuilder should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTaking2ArgumentsReturningNonEmptyString() throws Throwable  {
        // Creating a new StrBuilder instance
        StrBuilder strBuilder = new StrBuilder();
        
        // Appending a string to the StrBuilder
        strBuilder.append("org.apache.commons.lang3.ArrayUtils");
        
        // Checking the size of the StrBuilder
        assertEquals(35, strBuilder.size());
        
        // Extracting a substring from the StrBuilder
        String substring = strBuilder.substring(32, 3603);
        
        // Checking that the substring is "ils"
        assertEquals("ils", substring);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTaking2ArgumentsReturningEmptyString() throws Throwable  {
        // Create a new StrBuilder object and append some text to it
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("w4`&?*jk^v>fy2xsO+l");
        
        // Use the substring method to extract a portion of the string
        String subString = strBuilder.substring(2, 2);
        
        // Assert that the length of the extracted string is equal to 27
        assertEquals(27, subString.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubSequenceReturningCharSequenceWhereLengthIsPositive() throws Throwable  {
        // Given a string builder with the value "Rd~CHa$"
        StrBuilder arg0 = new StrBuilder("'Rd~CHa$");
        
        // When we append the string builder to itself
        StrBuilder append = arg0.append((Object) arg0);
        
        // Then the resulting string builder should have a size of 59
        assertEquals(59, arg0.size());
        
        // And the sub sequence from 0 to 46 should be "Rd~CHa$org.apache.commons.lang3.text.StrBuild"
        CharSequence subSequence = append.subSequence(0, 46);
        assertEquals("'Rd~CHa$org.apache.commons.lang3.text.StrBuild", subSequence);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSizeReturningPositive() throws Throwable  {
        // Given an empty string builder
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a line to it
        StrBuilder appendln = strBuilder.appendln(46);
        
        // Then the length of the string builder should be 3
        assertEquals(3, strBuilder.length());
        
        // And the size of the appended string should be 3
        assertEquals(3, appendln.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetNullTextReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given a StrBuilder with initial capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When the minimizeCapacity method is called
        strBuilder.minimizeCapacity();
        
        // Then the capacity is set to zero
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetNewLineTextReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Create a new StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // Minimize the capacity of the StrBuilder to 0
        strBuilder.minimizeCapacity();
        assertEquals(0, strBuilder.capacity());
        
        // Set the new line text to "null comparator"
        strBuilder.setNewLineText("null comparator");
        
        // Assert that the capacity of the StrBuilder is still 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2StringsReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder();
        
        // When
        strBuilder.minimizeCapacity();
        strBuilder.replaceFirst("", (String) null);
        
        // Then
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2CharsReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given a StrBuilder with a capacity of 32 and a length of 16
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        assertEquals(16, strBuilder.length());
        
        // When the minimizeCapacity method is called on the StrBuilder
        StrBuilder minimized = strBuilder.minimizeCapacity();
        
        // Then the capacity of the StrBuilder should be set to 0 and the length should be 0
        assertEquals(0, minimized.capacity());
        assertEquals(0, minimized.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking1And1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        StrBuilder minimizeCapacity = strBuilder.minimizeCapacity();
        StrMatcher arg0 = StrMatcher.splitMatcher();
        minimizeCapacity.replaceAll(arg0, (String) null);
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLengthReturningZero() throws Throwable  {
        // Given: A new StrBuilder instance is created with default capacity
        StrBuilder strBuilder = new StrBuilder();
        
        // When: The length and capacity of the string builder are retrieved
        int length = strBuilder.length();
        int capacity = strBuilder.capacity();
        
        // Then: The length should be 0 and the capacity should be 32
        assertEquals(0, length);
        assertEquals(32, capacity);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLengthReturningPositive() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        int expectedLength = 20;
        
        // Act
        strBuilder.append("length must be valid");
        int actualLength = strBuilder.length();
        
        // Assert
        assertEquals(expectedLength, actualLength);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningZeroAndLastIndexOfTaking1And1AndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Append a newline character to the string builder
        strBuilder.append("\n", (Object[]) null);
        // Create a matcher that matches the "split" pattern
        StrMatcher arg0 = StrMatcher.splitMatcher();
        // Get the last index of the matcher in the string builder
        int lastIndexOf = strBuilder.lastIndexOf(arg0, 11);
        
        // Assert that the string builder is not empty
        assertFalse(strBuilder.isEmpty());
        
        // Assert that the last index of the matcher is 0 (i.e., the first character)
        assertEquals(0, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStrMatcherReturningZero() throws Throwable  {
        // Given a string builder with a new line character
        StrBuilder strBuilder = new StrBuilder(1);
        strBuilder.appendNewLine();
        
        // When the last index of a trim matcher is obtained
        StrMatcher arg0 = StrMatcher.trimMatcher();
        int lastIndexOf = strBuilder.lastIndexOf(arg0);
        
        // Then the string builder should not be empty
        assertFalse(strBuilder.isEmpty());
        
        // And the last index of the trim matcher should be 0
        assertEquals(0, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningPositiveAndLastIndexOfTaking1And1AndLastIndexOfTaking1And10() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder("<#j[s7HF");
        int lastIndexOf = strBuilder.lastIndexOf('[', 1160);
        assertEquals(8, strBuilder.length());
        assertEquals(40, strBuilder.capacity());
        assertEquals(3, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingCharReturningPositive() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder(97);
        StrBuilder appendFixedWidthPadLeft = strBuilder.appendFixedWidthPadLeft(97, 97, '(');
        int lastIndexOf = appendFixedWidthPadLeft.lastIndexOf('0');
        assertFalse(strBuilder.isEmpty());
        assertEquals(95, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        char[] arg1 = new char[0];
        int startIndex = 0;
        int endIndex = 0;
        
        // Act
        StrBuilder insert = strBuilder.insert(startIndex, arg1, startIndex, endIndex);
        
        // Assert
        assertSame(insert, strBuilder);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Create a new StrBuilder instance with an initial capacity of 44
        StrBuilder strBuilder = new StrBuilder(44);
        
        // Assert that the StrBuilder's capacity is equal to 44
        assertEquals(44, strBuilder.capacity());
        
        // Minimize the StrBuilder's capacity by calling the minimizeCapacity method
        StrBuilder minimizedStrBuilder = strBuilder.minimizeCapacity();
        
        // Assert that the StrBuilder's capacity is now equal to 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking2Ints() throws Throwable  {
        StrBuilder arg0 = new StrBuilder(); // Create a new instance of StrBuilder to test
        
        // Test the appendFixedWidthPadRight method with a String argument and padding character 'J'
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 97, 'J');
        assertEquals(194, arg0.capacity()); // Verify that the capacity of the StrBuilder is 194
        assertEquals(98, arg0.size()); // Verify that the size of the StrBuilder is 98
        
        // Test the insert method with an integer argument
        appendFixedWidthPadRight.insert(5, 5);
        assertEquals(200, arg0.capacity()); // Verify that the capacity of the StrBuilder is now 200
        assertEquals(103, arg0.size()); // Verify that the size of the StrBuilder is now 103
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1AndAppendFixedWidthPadLeftTaking2IntsAnd1() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder(97);
        // Create a new String Builder object with an initial capacity of 97 characters.
        StrBuilder appendFixedWidthPadLeft = strBuilder.appendFixedWidthPadLeft(97, 97, '(');
        // Append a fixed-width string to the builder using a specified padding character and a length of 97 characters.
        appendFixedWidthPadLeft.insert(97, 423.7924909687189);
        // Insert a double value into the builder at the specified position (in this case, the end).
        assertEquals(114, strBuilder.size());
        // Assert that the size of the builder is equal to 114 characters.
        assertEquals(228, strBuilder.capacity());
        // Assert that the capacity of the builder is equal to 228 characters.);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1ReturningZeroAndIndexOfTaking1And1() throws Throwable  {
        // Create a new StrBuilder object and set its initial value to an empty string
        StrBuilder strBuilder = new StrBuilder();
        
        // Append a newline character to the end of the string builder
        strBuilder.appendNewLine();
        
        // Create a TrimMatcher object to be used for searching in the string builder
        StrMatcher.TrimMatcher trimMatcher = new StrMatcher.TrimMatcher();
        
        // Use the indexOf method on the string builder to find the first occurrence of the newline character
        int indexOfNewLine = strBuilder.indexOf((StrMatcher) trimMatcher, (-179));
        
        // Assert that the string builder is not empty
        assertFalse(strBuilder.isEmpty());
        
        // Assert that the index of the newline character in the string builder is 0
        assertEquals(0, indexOfNewLine);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingStrMatcherReturningNegative() throws Throwable  {
        // Create a new StrBuilder with the value "java.vm.name"
        StrBuilder strBuilder = new StrBuilder("java.vm.name");
        
        // Use the tab matcher to find the first occurrence of a tab character in the StrBuilder
        StrMatcher arg0 = StrMatcher.tabMatcher();
        int indexOf = strBuilder.indexOf(arg0);
        
        // Assert that the length of the StrBuilder is 44
        assertEquals(44, strBuilder.capacity());
        
        // Assert that the index of the first occurrence of a tab character in the StrBuilder is -1 (i.e., not found)
        assertEquals((-1), indexOf);
        
        // Assert that the length of the StrBuilder is 12
        assertEquals(12, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingCharReturningZero() throws Throwable  {
        // Given: We have a StrBuilder object with a fixed width of 97 characters
        StrBuilder strBuilder = new StrBuilder(97);
        
        // When: We append a string to the StrBuilder using the appendFixedWidthPadLeft method,
        // and we specify a padding character of '5'
        strBuilder.appendFixedWidthPadLeft(97, 97, '5');
        
        // Then: The resulting string should be a fixed width of 97 characters
        assertEquals(97, strBuilder.length());
        
        // And: The resulting string should contain the padding character '5' at the beginning
        // and end of the string
        assertTrue(strBuilder.startsWith("5"));
        assertTrue(strBuilder.endsWith("5"));
        
        // And: The index of the first occurrence of the padding character in the string
        // should be 0
        int indexOf = strBuilder.indexOf('5');
        assertEquals(0, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingCharReturningNegative() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder("V|");
        
        // Check that the ' character is not found in the string
        int indexOf = strBuilder.indexOf('\'');
        assertEquals((-1), indexOf);
        
        // Check that the length of the string is 2
        assertEquals(2, strBuilder.length());
        
        // Check that the capacity of the string builder is 34
        assertEquals(34, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNullTextReturningNonEmptyString() throws Throwable  {
        // Given a StrBuilder instance with some initial capacity and length
        StrBuilder strBuilder = new StrBuilder("|p);B?vWxH|;Bcm");
        strBuilder.setNullText("|p);B?vWxH|;Bcm");
        
        // When we retrieve the null text of the StrBuilder instance
        String nullText = strBuilder.getNullText();
        
        // Then the returned value should be the expected null text
        assertEquals(47, strBuilder.capacity());
        assertEquals(15, strBuilder.length());
        assertNotNull(nullText);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNewLineTextReturningNonEmptyString() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        strBuilder.setNewLineText(" 6$BZ|+H^D(bV");
        
        // Asserting that the capacity of the StringBuilder is equal to 45
        assertEquals(45, strBuilder.capacity());
        
        // Asserting that the length of the StringBuilder is equal to 13
        assertEquals(13, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEnsureCapacityReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder(44);
        assertEquals(44, strBuilder.capacity());
        
        strBuilder.minimizeCapacity();
        strBuilder.ensureCapacity(0);
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingStrMatcher() throws Throwable  {
        // Given a StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When the StrBuilder's capacity is minimized using the "minimizeCapacity" method
        StrBuilder minimizeCapacity = strBuilder.minimizeCapacity();
        
        // Then the resulting StrBuilder has a capacity of 0
        assertEquals(0, minimizeCapacity.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingStringReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Create a new StrBuilder with a capacity of 97
        StrBuilder arg0 = new StrBuilder(97);
        
        // Append "X" to the end of the StrBuilder, using fixed width padding
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 97, 'X');
        
        // Delete any leading characters that are not a letter or digit
        appendFixedWidthPadRight.deleteFirst("^]B|(p{");
        
        // Assert that the StrBuilder is not empty
        assertFalse(arg0.isEmpty());
        
        // Assert that the capacity of the StrBuilder is 97
        assertEquals(97, arg0.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingStringReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        StrBuilder sb = new StrBuilder(); // This line creates a new instance of the StrBuilder class
        assertEquals(32, sb.capacity()); // This line asserts that the capacity of the StrBuilder object is equal to 32
        
        sb.minimizeCapacity(); // This line minimizes the capacity of the StrBuilder object
        sb.deleteFirst("iS\fm#Q\"*`a=&f%n '"); // This line deletes the first occurrence of the specified string from the StrBuilder object
        assertEquals(0, sb.capacity()); // This line asserts that the capacity of the StrBuilder object is equal to 0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingCharReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a string builder with some initial data
        StrBuilder strBuilder = new StrBuilder("hello");
        
        // When we call deleteFirst on the string builder
        StrBuilder deleteFirst = strBuilder.deleteFirst('j');
        
        // Then the resulting string should be "ello" and have a capacity of 32
        assertEquals(32, deleteFirst.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteCharAtReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder with a single character 'M'
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendSeparator('M', 'M');
        
        // When deleting the first character of the builder
        strBuilder.deleteCharAt(0);
        
        // Then the size of the builder should be 0
        assertEquals(0, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingStrMatcherReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new StrBuilder instance with default capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // Assert that the initial capacity is 32
        assertEquals(32, strBuilder.capacity());
        
        // Minimize the capacity of the StrBuilder instance to zero
        StrBuilder minimizedStrBuilder = strBuilder.minimizeCapacity();
        
        // Assert that the minimum capacity has been reached
        assertEquals(0, strBuilder.capacity());
        
        // Delete all occurrences of the string "Z!`)?]7i" from the StrBuilder instance
        minimizedStrBuilder.deleteAll(StrMatcher.stringMatcher("Z!`)?]7i"));
        
        // Assert that the string has been deleted from the StrBuilder instance
        assertTrue(!minimizedStrBuilder.toString().contains("Z!`)?]7i"));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingStringReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Creating a new string builder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // Asserting that the initial capacity is 32
        assertEquals(32, strBuilder.capacity());
        
        // Minimizing the capacity of the string builder to its minimum value
        strBuilder.minimizeCapacity();
        
        // Deleting all occurrences of the string "Hello, World!" from the string builder
        strBuilder.deleteAll("Hello, World!");
        
        // Asserting that the new capacity is 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingCharReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder with capacity 44
        StrBuilder strBuilder = new StrBuilder(44);
        
        // When the capacity is minimized
        strBuilder.minimizeCapacity();
        
        // Then the capacity should be 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testClearReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given a StrBuilder with capacity -1171
        StrBuilder strBuilder = new StrBuilder((-1171));
        
        // When the minimizeCapacity method is called on the StrBuilder
        strBuilder.minimizeCapacity();
        
        // Then the capacity of the StrBuilder should be 32
        assertEquals(32, strBuilder.capacity());
        
        // Given a cleared StrBuilder with capacity 0
        StrBuilder clear = strBuilder.clear();
        
        // When the minimizeCapacity method is called on the cleared StrBuilder
        strBuilder.minimizeCapacity();
        
        // Then the capacity of the cleared StrBuilder should be 0
        assertEquals(0, clear.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharAtReturningOtherChar() throws Throwable  {
        // Given a string builder with initial capacity of 5 and a negative double value appended
        StrBuilder strBuilder = new StrBuilder("java.vendor.url");
        strBuilder.size = 5;
        strBuilder.appendln((-169.0));
        
        // When we call the charAt method with an index of 5
        char charAt = strBuilder.charAt(5);
        
        // Then the length of the string builder should be 12
        assertEquals(12, strBuilder.length());
        
        // And the character at index 5 should be '-'
        assertEquals('-', charAt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharAtReturningDigit() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("java.vendor.url");
        StrBuilder clear = strBuilder.clear();
        clear.appendln((-169.0));
        char charAt = strBuilder.charAt(2);
        assertEquals(7, strBuilder.size());
        assertEquals('6', charAt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharAtReturningAlphabeticChar() throws Throwable  {
        // Given a string containing an Apache Commons Lang version number
        StrBuilder strBuilder = new StrBuilder("org.apache.commons.lang3.JavaVersion");
        
        // When we call the charAt method with an index of 2
        char charAt = strBuilder.charAt(2);
        
        // Then the character at that index should be 'g'
        assertEquals('g', charAt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBuildReturningEmptyString() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When the "build" method is called on the StrBuilder instance
        String build = strBuilder.build();
        
        // Then the built string should be empty
        assertEquals("", build);
        
        // And the capacity of the StrBuilder instance should still be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking1And2IntsAndAppendlnTaking1And2Ints0() throws Throwable  {
        // Given a StrBuilder object with an empty string as its argument
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[0];
        
        // When the appendln method is called with an empty array of characters
        strBuilder.appendln(arg0, 0, 0);
        
        // Then the StrBuilder object should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingStrBuilderReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder arg0 = strBuilder.setNewLineText("");
        StrBuilder appendln = strBuilder.appendln(arg0);
        assertEquals(32, appendln.capacity());
        assertEquals(0, appendln.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1AndMinimizeCapacity() throws Throwable  {
        Stack<Locale.FilteringMode> stack = new Stack<Locale.FilteringMode>();
        StrBuilder strBuilder = new StrBuilder(44);
        // Given that we have a string builder with initial capacity 44
        
        StrBuilder minimizeCapacity = strBuilder.minimizeCapacity();
        Iterator<Locale.FilteringMode> arg0 = stack.iterator();
        // When we call the method to minimize the capacity of the string builder
        
        minimizeCapacity.appendWithSeparators(arg0, "s");
        // Then we expect that the capacity of the string builder is 0
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking2StringsReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a string builder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When the minimum capacity is set to zero
        strBuilder.minimizeCapacity();
        
        // Then the capacity should be reduced to zero
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTakingStringReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Create a new StrBuilder with an initial capacity of 3574 characters
        StrBuilder strBuilder = new StrBuilder(3574);
        
        // Append a separator character and a string to the StrBuilder
        strBuilder.appendSeparator('W', 3124).append("");
        
        // Assert that the length of the StrBuilder is equal to 1
        assertEquals(1, strBuilder.length());
        
        // Assert that the capacity of the StrBuilder is equal to 3574 characters
        assertEquals(3574, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTakingStringReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given an empty StrBuilder with a default capacity
        StrBuilder strBuilder = new StrBuilder();
        
        // When we call minimizeCapacity() on the StrBuilder
        strBuilder.minimizeCapacity();
        
        // Then the capacity should be reduced to zero
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTakingCharReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        strBuilder.minimizeCapacity();
        strBuilder.appendSeparator('X');
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendNullReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Create a new StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // Minimize the capacity to zero using the minimizeCapacity method
        strBuilder.minimizeCapacity();
        assertEquals(0, strBuilder.capacity());
        
        // Append a null character to the StrBuilder
        strBuilder.appendNull();
        assertEquals(1, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadRightTaking2IntsAnd1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When the minimizeCapacity method is called
        StrBuilder minimizedStrBuilder = strBuilder.minimizeCapacity();
        
        // Then the capacity of the StrBuilder should be 0
        assertEquals(0, minimizedStrBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingObjectArrayReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a string builder with some initial data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("This is a test");
        
        // And an array of string builders to append
        StrBuilder[] arg0 = new StrBuilder[2];
        arg0[0] = new StrBuilder().append("String 1");
        arg0[1] = new StrBuilder().append("String 2");
        
        // When we call the appendAll method with this array of string builders
        strBuilder.appendAll(arg0);
        
        // Then the resulting string builder should contain all the appended data
        assertEquals("This is a testString 1String 2", strBuilder.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingIteratorReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        strBuilder.minimizeCapacity();
        ArrayDeque<Object> arrayDeque = new ArrayDeque<Object>();
        Iterator<Object> arg0 = arrayDeque.iterator();
        strBuilder.appendAll(arg0);
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Create a new instance of StrBuilder with a default capacity of 32
        
        assertEquals(32, strBuilder.capacity());
        
        // Minimize the capacity of the StrBuilder to 0
        strBuilder.minimizeCapacity();
        assertEquals(0, strBuilder.capacity());
        
        StrBuilder minimized = strBuilder.append((char[]) null, (-204), 102);
        // Append a string with length 102 to the StrBuilder
        
        assertEquals("", minimized.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharArrayReturningStrBuilderWhereLengthIsNegative() throws Throwable  {
        // Test that the StrBuilder's length() method returns the correct value for an empty string
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder appendln = strBuilder.appendln(2);
        appendln.size = (-3320);
        char[] arg0 = new char[0];
        appendln.append(arg0);
        assertEquals((-3320), appendln.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStrBuilderReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given a string builder with capacity 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When the minimizeCapacity method is called
        StrBuilder arg0 = strBuilder.minimizeCapacity();
        
        // Then the string builder's capacity should be 0
        assertEquals(0, strBuilder.capacity());
        
        // And the string builder's length should also be 0
        assertEquals(0, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsPositiveAndAppendTaking1And2Ints0() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder("Cannot get the toString of a null identity");
        
        // When
        String result = strBuilder.toString();
        
        // Then
        assertEquals(54, result.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given: A StrBuilder with a capacity of 3574 characters
        StrBuilder strBuilder = new StrBuilder(3574);
        
        // When: The StrBuilder's capacity is minimized using the "minimizeCapacity" method
        StrBuilder minimizeCapacity = strBuilder.minimizeCapacity();
        
        // Then: The StrBuilder's capacity should be 0, as it has been reduced to its minimum value
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsTakingStrBuilderWithStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new StrBuilder instance with default capacity
        StrBuilder sb = new StrBuilder();
        
        // Check if the instance equals itself
        boolean equals = sb.equals(sb);
        assertTrue(equals);
        
        // Check if the instance has the expected capacity
        assertEquals(32, sb.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningPositiveAndLastIndexOfTaking1And1AndLastIndexOfTaking1And11() throws Throwable  {
        // No Comments were added
        StrMatcher arg0 = StrMatcher.charSetMatcher("ZMlR-{eLr)JnK");
        StrBuilder strBuilder = new StrBuilder("ZMlR-{eLr)JnK");
        int lastIndexOf = strBuilder.lastIndexOf(arg0, 3445);
        assertEquals(45, strBuilder.capacity());
        assertEquals(12, lastIndexOf);
        assertEquals(13, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndLastIndexOfTaking1And1AndLastIndexOfTaking1And10() throws Throwable  {
        // Given a StrBuilder object with some initial text
        StrBuilder strBuilder = new StrBuilder("java.vm.name");
        
        // When we perform some operations on the StrBuilder
        StrMatcher arg0 = StrMatcher.splitMatcher();
        int lastIndexOf = strBuilder.lastIndexOf(arg0, 537);
        
        // Then we can assert that the length of the string is correct
        assertEquals(12, strBuilder.length());
        
        // And we can also assert that the last index of the split matcher is correct
        assertEquals((-1), lastIndexOf);
        
        // Finally, we can assert that the capacity of the StrBuilder is correct
        assertEquals(44, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1AndLastIndexOfTaking1And1AndLastIndexOfTaking1And1ReturningNegative0() throws Throwable  {
        // No Comments were added
        StrBuilder arg0 = new StrBuilder();
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 97, 'J');
        int lastIndexOf = appendFixedWidthPadRight.lastIndexOf("ZMlR-{eLr)JnK", 5);
        assertFalse(arg0.isEmpty());
        assertEquals((-1), lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningZeroAndLastIndexOfTaking1And1AndLastIndexOfTaking1And10() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("ZMlR-{eLr)JnK");
        int lastIndexOf = strBuilder.lastIndexOf("ZMlR-{eLr)JnK", 3003);
        assertEquals(0, lastIndexOf);
        assertEquals(45, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningPositiveAndLastIndexOfTaking1And1AndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        // Given a StrBuilder object with some data
        StrBuilder arg0 = new StrBuilder();
        
        // When the appendFixedWidthPadRight method is called on the StrBuilder object
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 97, 'J');
        
        // Then the length of the resulting string should be 96 characters
        assertEquals(96, appendFixedWidthPadRight.length());
        
        // And the lastIndexOf method should return -1 because there are no occurrences of "" in the string
        assertEquals(-1, appendFixedWidthPadRight.lastIndexOf("", 97));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1ReturningZeroAndLastIndexOfTaking1And1AndLastIndexOfTaking1And11() throws Throwable  {
        // Given a StrBuilder object with some initial data
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When the lastIndexOf method is called with a space character and a starting index of 0
        int lastIndexOf = strBuilder.lastIndexOf(' ', 0);
        
        // Then the result should be the first occurrence of a space character in the string
        assertEquals(45, strBuilder.capacity());
        assertEquals(13, strBuilder.size());
        assertEquals(0, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsIndexOfTaking1And1() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Create a trim matcher to remove leading and trailing whitespace from the string
        StrMatcher.TrimMatcher arg0 = new StrMatcher.TrimMatcher();
        
        // Use the trim matcher to find the index of the first occurrence of the substring "hello" in the string builder, starting from position -179
        int indexOf = strBuilder.indexOf((StrMatcher) arg0, (-179));
        
        assertEquals(32, strBuilder.capacity());
        // Verify that the index is equal to -1, since there are no occurrences of "hello" in the string builder
        assertEquals((-1), indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithEmptyString() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Create a new String Builder instance with initial capacity of 32
        assertEquals(32, strBuilder.capacity());
        
        int indexOf = strBuilder.indexOf("", (-2202));
        // Find the first occurrence of an empty string in the StringBuilder instance starting from index -2202
        assertEquals((-1), indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithNull() throws Throwable  {
        // Given a StrBuilder with capacity of 32 and content "hello world"
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("hello world");
        
        // When calling indexOf with null string and starting position of 34
        int indexOf = strBuilder.indexOf((String) null, 34);
        
        // Then the method should return -1
        assertEquals(-1, indexOf);
        
        // And the capacity of the StrBuilder should remain unchanged
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithNegative() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder(115);
        strBuilder.appendln((-1.0));
        int indexOf = strBuilder.indexOf('t', (-128));
        assertEquals(5, strBuilder.size());
        assertEquals((-1), indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1ReturningPositiveAndIndexOfTaking1And1AndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        // Given a StrBuilder instance with some data in it
        StrBuilder arg0 = new StrBuilder();
        
        // When we append a fixed-width padded string to the end of the builder
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 97, 'J');
        
        // Then the builder should have the expected data and index
        assertFalse(arg0.isEmpty());
        int expectedIndex = 51;
        assertEquals(expectedIndex, appendFixedWidthPadRight.indexOf('J', 31));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingIntAndCallsIndexOfTaking1And1() throws Throwable  {
        // Given a StrBuilder with a capacity of 102 and initialized with a string that contains the character 'r' at index 102
        StrBuilder strBuilder = new StrBuilder(102);
        strBuilder.append("Hello World");
        
        // When searching for the character 'r' at index 102 using the StrBuilder's indexOf() method
        int indexOf = strBuilder.indexOf('r', 102);
        
        // Then the method should return -1 to indicate that the character was not found
        assertEquals(-1, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingStringReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a string builder with some content
        StrBuilder strBuilder = new StrBuilder("org.apache.commons.lang3.JavaVersion");
        
        // When we delete part of the string
        strBuilder.delete(2, 105);
        
        // Then the length of the string builder should be reduced accordingly
        assertEquals(2, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1WithPositiveAndNonEmptyString() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("java.vendor.url");
        StrBuilder setNewLineText = strBuilder.setNewLineText("org.apache.commons.lang3.JavaVersion");
        strBuilder.appendln((-169.0));
        setNewLineText.insert(30, "Z/q]~8`b$");
        assertEquals(114, setNewLineText.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1WithNull() throws Throwable  {
        // Given a StrBuilder with some initial value
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When we insert a null string at the beginning of the StrBuilder
        StrBuilder insertedStrBuilder = strBuilder.insert(0, (String) null);
        
        // Then the length of the resulting StrBuilder should be 13
        assertEquals(13, insertedStrBuilder.length());
        
        // And the capacity of the resulting StrBuilder should be 45
        assertEquals(45, insertedStrBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadRightTaking11And1WithOtherChar() throws Throwable  {
        // Given a StrBuilder instance with a fixed width pad right
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a string to it with a fixed width
        strBuilder.appendFixedWidthPadRight("This is a test string", 10, '+');
        
        // Then the resulting string should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadLeftTaking11And1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder object of capacity 97
        StrBuilder arg0 = new StrBuilder(97);
        
        // When the appendFixedWidthPadLeft method is called with a negative pad character (-1) and 'u' as the padding character
        StrBuilder appendFixedWidthPadLeft = arg0.appendFixedWidthPadLeft((Object) arg0, (-1), 'u');
        
        // Then the returned object has the same capacity as the original StrBuilder (97)
        assertEquals(97, appendFixedWidthPadLeft.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingBooleanWithTrue() throws Throwable  {
        // Given a StrBuilder object with an initial value of true
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append(true);
        
        // When the size of the StrBuilder is retrieved
        int actualSize = strBuilder.size();
        
        // Then the expected size of 4 is returned
        assertEquals(4, actualSize);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithZeroAndAppendTaking1And2IntsAndAppendTaking1And2Ints0() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[1];
        
        // Act
        StrBuilder append = strBuilder.append(arg0, 0, 0);
        
        // Assert
        assertEquals(0, append.size());
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharArrayReturningStrBuilderWhereLengthIsPositive() throws Throwable  {
        // Given a StrBuilder instance with some data
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[1];
        strBuilder.append(arg0);
        
        // When we call the indexOf method with a substring and an offset
        int indexOf = strBuilder.indexOf("Lq30LX-/P6:Y", (-2297));
        
        // Then we expect the method to return -1
        assertFalse(strBuilder.isEmpty());
        assertEquals((-1), indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharArray() throws Throwable  {
        // Given: A StrBuilder instance with an empty char array as the argument to the append method
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[0];
        
        // When: The append method is called on the StrBuilder instance with the empty char array as the argument
        StrBuilder append = strBuilder.append(arg0);
        
        // Then: The capacity of the StrBuilder instance should be 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsPositiveAndAppendTaking1And2Ints1() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder arg0 = new StrBuilder("end < start");
        strBuilder.append(arg0, 3, 3);
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithPositiveAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException0() throws Throwable  {
        // Arrange
        StrBuilder arg0 = new StrBuilder();
        int invalidStartIndex = 3;
        int validLength = 3;
        
        // Act & Assert
        try {
        arg0.append(arg0, invalidStartIndex, validLength);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Verify that the exception is due to an invalid start index
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStrBuilder() throws Throwable  {
        // Given a StrBuilder with some initial data
        StrBuilder arg0 = new StrBuilder();
        arg0.append("Hello");
        
        // When appending the same StrBuilder to itself
        StrBuilder append = arg0.append(arg0);
        
        // Then the resulting StrBuilder should have the expected capacity and state
        assertEquals(32, append.capacity());
        assertTrue(append.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsAndCreatesStrBuilderTakingStringAndAppendTaking1And2Ints() throws Throwable  {
        // Given a StrBuilder with an initial capacity of 35
        StrBuilder strBuilder = new StrBuilder("...");
        
        // When we call append with null and a length of 2082
        StrBuilder append = strBuilder.append((StringBuilder) null, 0, 2082);
        
        // Then the returned value should have a capacity of 35
        assertEquals(35, append.capacity());
        
        // And the length of the returned value should be 3
        assertEquals(3, append.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBuilderWithNull() throws Throwable  {
        // Test that StrBuilder appends a string builder to itself correctly
        StrBuilder strBuilder = new StrBuilder("org.apache.commons.lang3.text.StrBuilder$StrBuilderTokenizer");
        StrBuilder append = strBuilder.append((StringBuilder) null);
        
        // Assert that the capacity of the resulting StringBuilder is 92
        assertEquals(92, append.capacity());
        
        // Assert that the length of the resulting StringBuilder is 60
        assertEquals(60, append.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsPositiveAndAppendTaking1And2Ints2() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder("-HAEsP):;AW\"2o");
        StringBuffer arg0 = new StringBuffer("");
        StrBuilder append = strBuilder.append(arg0, 0, 0);
        assertEquals(14, append.length());
        assertEquals(46, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBufferReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given an empty StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a StringBuffer to it
        StringBuffer arg0 = new StringBuffer((CharSequence) "This is a sample text.");
        strBuilder.append(arg0);
        
        // Then the resulting StrBuilder should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsAndCreatesStrBuilderTakingNoArgumentsAndAppendTaking1And2Ints() throws Throwable  {
        // Create a new instance of StrBuilder and append a string with % character
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("%", 0, 0);
        
        // Check the capacity of the string builder
        assertEquals(32, strBuilder.capacity());
        
        // Check the size of the appended string
        assertEquals(0, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringWithEmptyString() throws Throwable  {
        // Given a string builder object with an initial capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When the "append" method is called with an empty string
        StrBuilder append = strBuilder.append("");
        
        // Then the resulting string builder should have the same capacity as the original one
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingObjectReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new instance of StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        
        // Call the append method with null as parameter
        StrBuilder append = strBuilder.append((Object) null);
        
        // Check that the capacity of the builder is 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendNull() throws Throwable  {
        // Given a StrBuilder instance with an initial capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When the appendNull method is called on the StrBuilder instance
        StrBuilder appendNull = strBuilder.appendNull();
        
        // Then the capacity of the StrBuilder instance should be increased to 64
        assertEquals(64, appendNull.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendNewLineAndSetNewLineText() throws Throwable  {
        // Given: a StrBuilder object containing a string with various characters and line breaks
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        strBuilder.setNewLineText("%IN5/O");
        strBuilder.appendNewLine();
        
        // When: calling the length() method on the StrBuilder object
        int actualLength = strBuilder.length();
        
        // Then: the returned value should be 19, as it represents the total number of characters in the string
        assertEquals(19, actualLength);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTaking4ArgumentsThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder("java.vendor.url");
        StrBuilder setNewLineText = strBuilder.setNewLineText("org.apache.commons.lang3.JavaVersion");
        StrBuilder appendln = setNewLineText.appendln((-169.0));
        setNewLineText.append((-33.0707545866898));
        appendln.appendln((-514));
        char[] arg2 = new char[2];
        // Undeclared exception!
        try { 
          setNewLineText.getChars(2, 99, arg2, (-514));
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyReturningFalse() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder(97);
        StrBuilder appendFixedWidthPadLeft = strBuilder.appendFixedWidthPadLeft(97, 97, '(');
        boolean empty = appendFixedWidthPadLeft.isEmpty();
        assertEquals(97, strBuilder.size());
        assertFalse(empty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsEmptyReturningTrue() throws Throwable  {
        // Given: An instance of StrBuilder class with default capacity 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When: The isEmpty method is called on the instance
        boolean empty = strBuilder.isEmpty();
        
        // Then: The length of the string builder should be 0 and it should return true for isEmpty()
        assertEquals(32, strBuilder.capacity());
        assertTrue(empty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEnsureCapacityWithPositive() throws Throwable  {
        // Given a StrBuilder with an initial capacity of 127
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.ensureCapacity(127);
        
        // When the ensureCapacity method is called with a larger value (254)
        strBuilder.ensureCapacity(254);
        
        // Then the capacity of the StrBuilder should be set to the desired value (254)
        assertEquals(254, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEnsureCapacityReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a String Builder with some initial capacity
        StrBuilder strBuilder = new StrBuilder("y6$B0|+},D(bV");
        assertEquals(-1194, strBuilder.capacity());
        
        // When ensuring the capacity of the builder is increased to a negative number
        StrBuilder ensureCapacity = strBuilder.ensureCapacity((-1194));
        
        // Then the capacity of the builder is increased to the maximum allowed value of 2^30 - 1
        assertEquals(45, ensureCapacity.capacity());
        
        // And the length of the builder is not affected
        assertEquals(13, ensureCapacity.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningNonEmptyString() throws Throwable  {
        // Given a StrBuilder with some initial value
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When the toString method is called on the StrBuilder
        String string = strBuilder.toString();
        
        // Then the resulting String should be equal to the initial value
        assertEquals(" 6$BZ|+H^D(bV", string);
        
        // And the capacity of the StrBuilder should be 45
        assertEquals(45, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingInt() throws Throwable  {
        // Given a StrBuilder with some initial value
        StrBuilder strBuilder = new StrBuilder("Afi|,");
        
        // When we append a negative integer to the StrBuilder
        strBuilder.append(-2468);
        
        // Then the length of the StrBuilder should be 11
        assertEquals(11, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking2ArgumentsReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given: A String Builder object is created with an initial capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder();
        
        // When: The "append" method is called on the StringBuilder object with a null value as argument, resulting in an empty string being appended
        strBuilder.append("", (Object[]) null);
        
        // Then: The capacity of the StringBuilder object should be 32 characters
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingFloat() throws Throwable  {
        // Create a new instance of StrBuilder with an initial value
        StrBuilder strBuilder = new StrBuilder("<#j[s7HF");
        
        // Append a float value to the end of the string
        strBuilder.append((float) 0);
        
        // Assert that the length of the resulting string is equal to 11
        assertEquals(11, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingChar() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        
        // Act
        boolean isEmpty = strBuilder.isEmpty();
        
        // Assert
        assertFalse(isEmpty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceTaking5Arguments() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Poo");
        StrMatcher arg0 = StrMatcher.charMatcher('P');
        
        // Act
        StrBuilder replace = strBuilder.replace(arg0, "s@", 0, 0, (-248));
        
        // Assert
        assertEquals(32, replace.capacity());
        assertEquals("soo", replace.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndCallsSkip() throws Throwable  {
        // Given a StrBuilder with the contents "'Rd~CHa$"
        StrBuilder arg0 = new StrBuilder("'Rd~CHa$");
        
        // When creating a reader for this StrBuilder and calling skip(63L)
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        long skip = strBuilder_StrBuilderReader.skip(63L);
        
        // Then the reader should have skipped 8 characters
        assertEquals(8, skip);
        
        // And the reader should not be ready to read any more characters
        assertFalse(strBuilder_StrBuilderReader.ready());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsSkip() throws Throwable  {
        // Create a new StrBuilder instance with an initial capacity of 32
        StrBuilder arg0 = new StrBuilder(32);
        
        // Create a new StrBuilderReader from the given StrBuilder
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        
        // Skip the specified number of characters, in this case -86L
        long skip = strBuilder_StrBuilderReader.skip((-86L));
        
        // Assert that the size of the StrBuilder is 0
        assertEquals(0, arg0.size());
        
        // Assert that the capacity of the StrBuilder is 32
        assertEquals(32, arg0.capacity());
        
        // Assert that the number of characters skipped is 0L
        assertEquals(0L, skip);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadTaking3Arguments() throws Throwable  {
        // Set up a StrBuilder object with some data.
        StrBuilder arg0 = new StrBuilder();
        arg0.append("Hello, World!");
        
        // Create a StrBuilderReader object from the StrBuilder object.
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        
        // Attempt to read characters from the StrBuilderReader with a null char array.
        try {
        // This should throw an IndexOutOfBoundsException, as we are trying to read
        // characters from the StrBuilderReader using a null char array.
        strBuilder_StrBuilderReader.read((char[]) null, 116, (-583));
        
        // If the exception is not thrown, fail the test with an error message.
        fail("Expecting exception: IndexOutOfBoundsException");
        } catch(IndexOutOfBoundsException e) {
        // Verify that the exception was thrown with a null message.
        verifyException("org.apache.commons.lang3.text.StrBuilder$StrBuilderReader", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReadTakingNoArguments() throws Throwable  {
        // Given an empty string builder
        StrBuilder arg0 = new StrBuilder();
        
        // When reading from the string builder
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        int read = strBuilder_StrBuilderReader.read();
        
        // Then the size of the string builder is 0, the capacity is 32, and the read value is -1 (end of stream)
        assertEquals(0, arg0.size());
        assertEquals(32, arg0.capacity());
        assertEquals(-1, read);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetContent() throws Throwable  {
        // Given an empty string as input
        StrBuilder arg0 = new StrBuilder();
        
        // When we create a tokenizer for this builder
        StrBuilder.StrBuilderTokenizer strBuilder_StrBuilderTokenizer = arg0.new StrBuilderTokenizer();
        
        // Then the content should be an empty string
        String content = strBuilder_StrBuilderTokenizer.getContent();
        assertEquals("", content);
        
        // And the capacity of the builder should be 32
        assertEquals(32, arg0.capacity());
        
        // And the content should not be null
        assertNotNull(content);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTokenizerTakingStrBuilder() throws Throwable  {
        // Given a StrBuilder with some tokens
        StrBuilder arg0 = new StrBuilder();
        arg0.append("Hello World");
        StrBuilder.StrBuilderTokenizer strBuilder_StrBuilderTokenizer = arg0.new StrBuilderTokenizer();
        
        // When we call previous() on the tokenizer
        try {
        strBuilder_StrBuilderTokenizer.previous();
        
        // Then an exception is thrown because there are no tokens to iterate over
        fail("Expecting exception: NoSuchElementException");
        } catch(NoSuchElementException e) {
        // Verify that the exception is a NoSuchElementException with no message
        verifyException("org.apache.commons.lang3.text.StrTokenizer", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ThrowsStringIndexOutOfBoundsExceptionAndInsertTaking1And10() throws Throwable  {
        // Given: an instance of StrBuilder class, with some data already added to it.
        StrBuilder arg1 = new StrBuilder();
        arg1.append("Some text");
        
        // When: we try to insert a string at an index that is out of bounds.
        try {
        arg1.insert(-3921, (Object) arg1);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Then: we expect an exception to be thrown.
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTakingIntThrowsStringIndexOutOfBoundsException() throws Throwable  {
        // Test that a StringIndexOutOfBoundsException is thrown when calling substring() with an end index less than start index.
        StrBuilder strBuilder = new StrBuilder();
        try {
        // Undeclared exception!
        strBuilder.substring(351);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Verify that the expected exception is thrown with a message containing "end < start".
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTaking2ArgumentsThrowsStringIndexOutOfBoundsException() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        try {
        // Undeclared exception!
        strBuilder.substring((-1038), 1);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // The string index is out of range, so the method should throw this exception.
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsTakingObjectReturningFalse() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        boolean equals = strBuilder.equals((Object) "hello world");
        assertFalse(equals);
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndCallsEqualsTakingStrBuilder() throws Throwable  {
        // Given: Two StrBuilders with different contents
        StrBuilder arg0 = new StrBuilder("})+ovSBG");
        StrBuilder strBuilder = new StrBuilder("Vi3F+)xF");
        
        // When: Comparing the two StrBuilders using equals() method
        boolean equals = strBuilder.equals(arg0);
        
        // Then: The result of equals() should be false, since the contents of the two StrBuilders are different
        assertFalse(equals);
        
        // And: The size of the first StrBuilder should be 8
        assertEquals(8, strBuilder.size());
        
        // And: The capacity of the second StrBuilder should be 40
        assertEquals(40, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsTakingStrBuilder() throws Throwable  {
        // Given two StrBuilders with different values
        StrBuilder strBuilder = new StrBuilder("2<pIYEKt&6?");
        StrBuilder arg0 = new StrBuilder("10<pIYEKt&6?");
        
        // When we compare them using the equals method
        boolean equals = strBuilder.equals(arg0);
        
        // Then they are not equal and have different capacities
        assertFalse(equals);
        assertEquals(43, arg0.capacity());
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsTakingObjectReturningTrue() throws Throwable  {
        // Test that the StrBuilder class is able to create a new instance of itself and that it has a default capacity of 32.
        StrBuilder builder = new StrBuilder();
        assertEquals(32, builder.capacity());
        
        // Test that the equals method returns true for two instances of the same object.
        StrBuilder arg0 = new StrBuilder();
        boolean equals = arg0.equals((Object) arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsTakingStrBuilderReturningTrue() throws Throwable  {
        // Given two StrBuilders with the same value and capacity
        StrBuilder strBuilder = new StrBuilder("#i[)N@ {jVv+BU");
        StrBuilder arg0 = new StrBuilder("#i[)N@ {jVv+BU");
        
        // When we call equals on them
        boolean equals = strBuilder.equals(arg0);
        
        // Then the result is true and they have the same length
        assertTrue(equals);
        assertEquals(14, arg0.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingFloat() throws Throwable  {
        // create a StrBuilder with some initial data
        StrBuilder arg0 = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // append a float value to the StrBuilder
        arg0.appendln(662.269F);
        
        // create another StrBuilder with the same initial data and add the float value
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        strBuilder.appendln(662.269F);
        
        // check if both StrBuilders have the same size
        assertEquals(strBuilder.size(), arg0.size());
        
        // check if the StrBuilders are not equal in a case-insensitive manner
        boolean equalsIgnoreCase = strBuilder.equalsIgnoreCase(arg0);
        assertFalse(equalsIgnoreCase);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndCallsEqualsIgnoreCase0() throws Throwable  {
        // Given a StrBuilder object with some initial value
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+;^O(bV");
        
        // When the equalsIgnoreCase method is called on the same StrBuilder object
        boolean equalsIgnoreCase = strBuilder.equalsIgnoreCase(strBuilder);
        
        // Then the length of the StrBuilder should be 13
        assertEquals(13, strBuilder.length());
        
        // And the equality check should return true
        assertTrue(equalsIgnoreCase);
        
        // And the capacity of the StrBuilder should be 45
        assertEquals(45, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndCallsEqualsIgnoreCase1() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder arg0 = new StrBuilder(" 6$BZ|+H^D(bV");
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        boolean equalsIgnoreCase = strBuilder.equalsIgnoreCase(arg0);
        assertEquals(13, strBuilder.length());
        assertEquals(45, strBuilder.capacity());
        assertTrue(equalsIgnoreCase);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStrMatcherReturningNegative() throws Throwable  {
        // Given a StrBuilder object with some data and a tab matcher
        StrBuilder strBuilder = new StrBuilder("a3@eufUU9z*5;r!n3{");
        StrMatcher arg0 = StrMatcher.tabMatcher();
        
        // When the lastIndexOf method is called with the tab matcher as an argument
        int lastIndexOf = strBuilder.lastIndexOf(arg0);
        
        // Then the result should be -1 since there are no tabs in the string
        assertEquals((-1), lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingIntAndCallsLastIndexOfTaking1And1() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder(1);
        StrMatcher arg0 = StrMatcher.singleQuoteMatcher();
        int lastIndexOf = strBuilder.lastIndexOf(arg0, 1);
        assertEquals(1, strBuilder.capacity());
        assertEquals((-1), lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1WithNullAndNegative() throws Throwable  {
        // Given a StrBuilder with some initial data and a negative index
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("This is a test string.");
        int lastIndexOf = strBuilder.lastIndexOf((StrMatcher) null, (-860));
        
        // When the method "lastIndexOf" is called with a null matcher and a negative index
        int result = strBuilder.lastIndexOf((StrMatcher) null, (-860));
        
        // Then the result should be -1
        assertEquals(-1, result);
        
        // And the capacity of the StrBuilder should remain unchanged
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStringReturningNegative() throws Throwable  {
        // Given a string builder with special characters
        StrBuilder strBuilder = new StrBuilder("JAVA__9");
        
        // When the last index of a substring is searched for
        int lastIndexOf = strBuilder.lastIndexOf("JAV}__9");
        
        // Then the method returns -1, as the substring is not found
        assertEquals(-1, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStringReturningZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("JAVA_0_9");
        int lastIndexOf = strBuilder.lastIndexOf("JAVA_0_9");
        assertEquals(0, lastIndexOf);
        assertEquals(40, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1WithZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("V|");
        int lastIndexOf = strBuilder.lastIndexOf("JAVA_1_5", 0);
        assertEquals(2, strBuilder.length());
        assertEquals((-1), lastIndexOf);
        assertEquals(34, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndLastIndexOfTaking1And1AndLastIndexOfTaking1And11() throws Throwable  {
        // Given a string builder with some content and a specific character to search for
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When the last index of the character is searched for within the bounds of the string builder's capacity
        int lastIndexOf = strBuilder.lastIndexOf("_", 5401);
        
        // Then the method should return -1, as the character is not present in the string builder
        assertEquals(-1, lastIndexOf);
        
        // And the string builder's capacity and size should be as expected
        assertEquals(45, strBuilder.capacity());
        assertEquals(13, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1WithNull() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        int lastIndexOf = strBuilder.lastIndexOf((String) null, 102);
        assertEquals(32, strBuilder.capacity());
        assertEquals((-1), lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndLastIndexOfTaking1And1AndLastIndexOfTaking1And10() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        
        // Test that the string "not found" is not found in the first 102 characters of the string
        int lastIndexOf = strBuilder.lastIndexOf("not found", 102);
        assertEquals(-1, lastIndexOf);
        
        // Test that the capacity of the StrBuilder is equal to 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingCharArray() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[7];
        arg0[0] = 'r';
        strBuilder.appendln(arg0);
        int lastIndexOf = strBuilder.lastIndexOf('r');
        assertEquals(8, strBuilder.size());
        assertEquals(0, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTaking1And1AndLastIndexOfTaking1And1AndLastIndexOfTaking1And1ReturningNegative1() throws Throwable  {
        // Given a string builder with some text
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendFixedWidthPadRight("This is a sample string", 97, 'J');
        
        // When the last index of '%' character is searched for
        int lastIndexOf = strBuilder.lastIndexOf('%', 118);
        
        // Then the result should be negative one
        assertEquals(-1, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndLastIndexOfTaking1And1AndLastIndexOfTaking1And11() throws Throwable  {
        // Given a StrBuilder object with capacity of 32 and initialized with some data.
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("This is some sample data");
        
        // When the lastIndexOf method is called with the character '%' and a limit of 118.
        int lastIndexOf = strBuilder.lastIndexOf('%', 118);
        
        // Then the value returned should be -1, indicating that the character '%' was not found in the string before the limit.
        assertEquals((-1), lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithZero() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder("V|");
        StrMatcher.CharMatcher arg0 = new StrMatcher.CharMatcher('%');
        int indexOf = strBuilder.indexOf((StrMatcher) arg0, 0);
        assertEquals((-1), indexOf);
        assertEquals(34, strBuilder.capacity());
        assertEquals(2, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithNullAndPositive() throws Throwable  {
        // Given a StrBuilder with some data and a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        assertEquals(11, strBuilder.length());
        assertEquals(32, strBuilder.capacity());
        
        // When we call indexOf with null matcher and a start index of 1801
        int indexOf = strBuilder.indexOf((StrMatcher) null, 1801);
        
        // Then the result is -1, indicating that no match was found
        assertEquals(-1, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1ReturningPositiveAndIndexOfTaking1And1AndIndexOfTaking1And10() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder(")Y )G\"~Ws\"UM{Q`");
        StrMatcher.CharMatcher arg0 = new StrMatcher.CharMatcher(' ');
        int indexOf = strBuilder.indexOf((StrMatcher) arg0, (-633));
        assertEquals(15, strBuilder.length());
        assertEquals(47, strBuilder.capacity());
        assertEquals(2, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1() throws Throwable  {
        // Given a StrBuilder object with some initial values
        StrBuilder strBuilder = new StrBuilder("}GtF=_=?3;");
        
        // When we call the indexOf method with a substring and an offset parameter
        int indexOf = strBuilder.indexOf("6.1", (-2471));
        
        // Then we expect the method to return -1 because the substring is not found in the StrBuilder object
        assertEquals(-1, indexOf);
        
        // And we expect the size of the StrBuilder object to be 10
        assertEquals(10, strBuilder.size());
        
        // And we expect the capacity of the StrBuilder object to be 42
        assertEquals(42, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1ReturningPositiveAndIndexOfTaking1And1AndIndexOfTaking1And11() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("Zz}OUl~/%ud^ZNsAH@");
        int indexOf = strBuilder.indexOf("", 5);
        assertEquals(50, strBuilder.capacity());
        assertEquals(5, indexOf);
        assertEquals(18, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingStringReturningNegative() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        int indexOf = strBuilder.indexOf((String) null);
        assertEquals(32, strBuilder.capacity());
        assertEquals((-1), indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1ReturningZeroAndCreatesStrBuilderTakingStringAndIndexOfTaking1And1() throws Throwable  {
        // Given a StrBuilder with the value "java.vm.name"
        StrBuilder strBuilder = new StrBuilder("java.vm.name");
        
        // When the indexOf method is called with the substring "java.vm.name" and a start index of -599
        int indexOf = strBuilder.indexOf("java.vm.name", (-599));
        
        // Then the first occurrence of the substring "java.vm.name" should be found at index 0
        assertEquals(0, indexOf);
        
        // And the capacity of the StrBuilder should be 44
        assertEquals(44, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTaking1And1WithPositive() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        // Given a String Builder with some initial data
        
        int indexOf = strBuilder.indexOf("]", 4);
        // When searching for the first occurrence of "]" in the builder starting from position 4
        
        assertEquals(45, strBuilder.capacity());
        // Then the capacity of the builder should be 45
        
        assertEquals(13, strBuilder.size());
        // And the size of the builder should be 13
        
        assertEquals(-1, indexOf);
        // And the returned index should be -1 since "]" is not present in the builder
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsTakingStrMatcherReturningTrue() throws Throwable  {
        // Given a StrBuilder object containing the string "V|"
        StrBuilder strBuilder = new StrBuilder("V|");
        
        // When we call contains on the StrBuilder object with a char set matcher for "V|"
        boolean contains = strBuilder.contains(StrMatcher.charSetMatcher("V|"));
        
        // Then we expect that the StrBuilder contains the string "V|"
        assertTrue(contains);
        
        // And we expect that the length of the StrBuilder is 2
        assertEquals(2, strBuilder.length());
        
        // And we expect that the capacity of the StrBuilder is 34
        assertEquals(34, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsTakingStrMatcherReturningFalse() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        StrMatcher arg0 = StrMatcher.noneMatcher();
        boolean contains = strBuilder.contains(arg0);
        assertFalse(contains);
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsTakingStringReturningTrue() throws Throwable  {
        // Given a StrBuilder with a capacity of 47 and a value of "java.vendor.url"
        StrBuilder strBuilder = new StrBuilder("java.vendor.url");
        
        // When we call the contains method with "java.vendor.url" as an argument
        boolean contains = strBuilder.contains("java.vendor.url");
        
        // Then the method should return true
        assertTrue(contains);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsTakingStringReturningFalse() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When we call the contains method with the argument "hello world"
        boolean contains = strBuilder.contains("hello world");
        
        // Then the method should return false, as "hello world" is not in the builder
        assertFalse(contains);
        
        // And the capacity of the builder should still be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testContainsTakingChar() throws Throwable  {
        // Given a StrBuilder with some text and a backquote character
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When the contains method is called with the backquote character as an argument
        boolean contains = strBuilder.contains('`');
        
        // Then the contains method should return false, since the backquote character is not present in the StrBuilder
        assertFalse(contains);
        
        // And the length of the StrBuilder should be 13, since it only contains the text "6$BZ|+H^D(bV"
        assertEquals(13, strBuilder.length());
        
        // And the capacity of the StrBuilder should be 45, since it has enough space to hold all the characters in the text
        assertEquals(45, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMidStringReturningEmptyString() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.midString(115, 32);
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMidStringWithNegativeAndMidStringReturningEmptyString() throws Throwable  {
        // Given a StrBuilder with some initial data
        StrBuilder strBuilder = new StrBuilder("<#j[s7HF");
        
        // When the midString method is called with a negative argument
        strBuilder.midString((-506), (-506));
        
        // Then the length of the StrBuilder should be 8
        assertEquals(8, strBuilder.length());
        
        // And the capacity of the StrBuilder should be 40
        assertEquals(40, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMidStringWithNegativeAndMidStringReturningNonEmptyString() throws Throwable  {
        // Given a string builder with a capacity of 41 characters and a string
        // value "<#D`[s7HF"
        StrBuilder strBuilder = new StrBuilder("<#D`[s7HF");
        
        // When the midString method is called with negative start index -1023 and length 97
        String midString = strBuilder.midString((-1023), 97);
        
        // Then the returned string should be "<#D`[s7HF"
        assertEquals("<#D`[s7HF", midString);
        
        // And the capacity of the string builder should still be 41 characters
        assertEquals(41, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMidString() throws Throwable  {
        // Given a StrBuilder with some initial content
        StrBuilder strBuilder = new StrBuilder("}GtF=_=?3;");
        
        // When we call midString(2, 2) on the StrBuilder
        String midString = strBuilder.midString(2, 2);
        
        // Then the returned string should be "tF"
        assertEquals("tF", midString);
        
        // And the length of the StrBuilder should be 10
        assertEquals(10, strBuilder.length());
        
        // And the capacity of the StrBuilder should be 42
        assertEquals(42, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRightStringReturningNonEmptyString() throws Throwable  {
        // Given: A String Builder object named "arg0" with the value "..."
        StrBuilder arg0 = new StrBuilder("...");
        
        // When: The method "append" is called on the String Builder object, passing in a string and start index of 1, and end index of 1
        StrBuilder append = arg0.append("...", 1, 1);
        
        // Then: The new String Builder object should have a length of 3
        assertEquals(3, arg0.length());
        
        // When: The method "appendln" is called on the String Builder object with the same string and start index of 1 as before
        StrBuilder appendln = append.appendln("...", 1);
        
        // Then: The new String Builder object should have a length of 4, since it includes the newline character
        assertEquals(4, arg0.length());
        
        // When: The method "rightString" is called on the String Builder object with a start index of 1 and a length of 1
        String rightString = appendln.rightString(1);
        
        // Then: The returned string should be the newline character "\n"
        assertEquals("\n", rightString);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRightStringWithNegative() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.rightString((-1019));
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRightString() throws Throwable  {
        // Given a String Builder with capacity of 3574
        StrBuilder strBuilder = new StrBuilder(3574);
        
        // When we call the rightString method with an argument of 42
        String rightString = strBuilder.rightString(42);
        
        // Then the result should be an empty string
        assertEquals("", rightString);
        
        // And the capacity of the String Builder should remain unchanged
        assertEquals(3574, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLeftString() throws Throwable  {
        // Create a new StrBuilder with an initial capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder(32);
        
        // Call the leftString method to get the first 13 characters from the builder
        String leftString = strBuilder.leftString(13);
        
        // Check that the length of the returned string is 13 and that it is empty
        assertEquals(13, leftString.length());
        assertEquals("", leftString);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLeftStringWithNegative() throws Throwable  {
        // Given a StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When the leftString method is called with a negative argument
        strBuilder.leftString(-2370);
        
        // Then the resulting String should have a length of 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLeftStringReturningNonEmptyString() throws Throwable  {
        // Given a StrBuilder object initialized with a string that contains some text and symbols
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When the leftString method is called on the StrBuilder object to retrieve the leftmost 6 characters of the string
        String leftString = strBuilder.leftString(6);
        
        // Then assert that the length of the resulting String is equal to 13
        assertEquals(13, leftString.length());
        
        // And assert that the capacity of the StrBuilder object has not changed
        assertEquals(45, strBuilder.capacity());
        
        // And assert that the returned String contains only the leftmost 6 characters of the original string
        assertEquals(" 6$BZ|", leftString);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubSequenceWithNegativeAndPositive() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Check that an exception is thrown when the start index is negative
        try {
        strBuilder.subSequence(1, -1);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubSequenceReturningCharSequenceWhereLengthIsZero() throws Throwable  {
        // Given a StrBuilder object with an empty string
        StrBuilder sb = new StrBuilder();
        
        // When we call the subSequence method with start and end indices of 0
        CharSequence subSequence = sb.subSequence(0, 0);
        
        // Then the resulting CharSequence should be an empty string
        assertEquals("", subSequence);
        
        // And the capacity of the StrBuilder object should be equal to 32
        assertEquals(32, sb.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubSequenceWithNegativeAndNegative() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        // Undeclared exception!
        try { 
          strBuilder.subSequence((-2043), (-2043));
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
           //
           // String index out of range: -2043
           //
           verifyException("org.apache.commons.lang3.text.StrBuilder", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubSequenceWithPositive() throws Throwable  {
        // Given a StrBuilder object with some data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // When I try to get the subsequence of the string
        try {
        strBuilder.subSequence(1, 3);
        
        // Then I expect a StringIndexOutOfBoundsException
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Verify that the correct exception is thrown
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingStringAndCallsEndsWith() throws Throwable  {
        // Given a string builder with a specific value
        String expectedValue = "Zz}OUl~/%ud^2ZNsAH@";
        StrBuilder strBuilder = new StrBuilder(expectedValue);
        
        // When checking if the string builder ends with a specific substring
        boolean endsWith = strBuilder.endsWith("java.vendor.url");
        
        // Then the method should return false, as the substring is not found in the string builder
        assertFalse(endsWith);
        
        // And the length of the string builder should be 19
        assertEquals(19, strBuilder.length());
        
        // And the capacity of the string builder should be 51
        assertEquals(51, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEndsWithReturningTrue() throws Throwable  {
        // Given a StrBuilder with some initial value
        StrBuilder strBuilder = new StrBuilder("'23QhE?sJ.b#?f#");
        
        // When checking if the StrBuilder ends with the given string
        boolean endsWith = strBuilder.endsWith("'23QhE?sJ.b#?f#");
        
        // Then assert that the method returns the expected value
        assertTrue(endsWith);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEndsWithWithEmptyString() throws Throwable  {
        // Given a string builder with some content
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Some text");
        
        // When checking if it ends with an empty string
        boolean endsWithEmptyString = strBuilder.endsWith("");
        
        // Then the result should be true
        assertTrue(endsWithEmptyString);
        
        // And the capacity of the string builder should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEndsWithWithNull() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        boolean endsWith = strBuilder.endsWith((String) null);
        assertEquals(32, strBuilder.capacity());
        assertFalse(endsWith);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsEndsWith() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        boolean endsWith = strBuilder.endsWith("ABC123");
        assertEquals(32, strBuilder.capacity());
        assertFalse(endsWith);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartsWithReturningTrue() throws Throwable  {
        // Given a StrBuilder instance with some initial value
        StrBuilder strBuilder = new StrBuilder("`=,jB");
        
        // When the startsWith method is called with a substring of the same value
        boolean startsWith = strBuilder.startsWith("`=,jB");
        
        // Then assert that the method returns true and the capacity is as expected
        assertTrue(startsWith);
        assertEquals(38, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartsWithWithEmptyString() throws Throwable  {
        // Given a StrBuilder with capacity 97 and default values
        StrBuilder strBuilder = new StrBuilder(97);
        
        // When testing if it starts with the empty string
        boolean startsWith = strBuilder.startsWith("");
        
        // Then it should have the expected capacity and return true for startsWith
        assertEquals(97, strBuilder.capacity());
        assertTrue(startsWith);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartsWithWithNull() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32 and a string to be searched for
        StrBuilder strBuilder = new StrBuilder((-786));
        
        // When the startsWith method is called with null as the search string
        boolean startsWith = strBuilder.startsWith((String) null);
        
        // Then the method should return false, as there is no text to be searched for
        assertEquals(32, strBuilder.capacity());
        assertFalse(startsWith);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStartsWithReturningFalse() throws Throwable  {
        // Given a StrBuilder with initial capacity of -786
        StrBuilder strBuilder = new StrBuilder((-786));
        
        // When we call the startsWith method with "Hello"
        boolean startsWith = strBuilder.startsWith("Hello");
        
        // Then the method returns false
        assertFalse(startsWith);
        
        // And the capacity of the StrBuilder remains 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingStringBuffer() throws Throwable  {
        // Arrange
        StringBuffer arg0 = new StringBuffer("Hello, World!");
        StrBuilder strBuilder = new StrBuilder();
        
        // Act
        strBuilder.appendln(arg0);
        assertEquals(1, strBuilder.size());
        
        strBuilder.trim();
        
        // Assert
        assertTrue(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReverseReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new StrBuilder object and populate it with some data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // Reverse the string in the StrBuilder object
        StrBuilder reverse = strBuilder.reverse();
        
        // Verify that the reversed string is correct
        assertEquals("dlroW olleH", reverse.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReverseReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a string ">6,-H~ll$cUmo"
        String inputString = ">6,-H~ll$cUmo";
        
        // When the string is reversed
        StrBuilder strBuilder = new StrBuilder(inputString);
        StrBuilder reverse = strBuilder.reverse();
        
        // Then the resulting string should have a capacity of 46 characters and a length of 14
        assertEquals(46, reverse.capacity());
        assertEquals(14, reverse.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingStrMatcherReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder with a capacity of 32 and a trim matcher
        StrBuilder strBuilder = new StrBuilder();
        StrMatcher.TrimMatcher arg0 = new StrMatcher.TrimMatcher();
        
        // When the deleteAll method is called on the StrBuilder with the trim matcher as an argument
        strBuilder.deleteAll((StrMatcher) arg0);
        
        // Then the resulting string should not be empty and have a capacity of 32
        assertFalse(strBuilder.isEmpty());
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2StringsWithEmptyString() throws Throwable  {
        // Given a StrBuilder object with some initial data
        StrBuilder strBuilder = new StrBuilder("#i[)N@ {jVv+BU");
        
        // When we call the replaceFirst method to remove a prefix from the string
        strBuilder.replaceFirst("#i[)N@ {jVv+BU", "");
        
        // Then the resulting string should be empty
        assertTrue(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2StringsReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Create a new StrBuilder object with the input string
        StrBuilder strBuilder = new StrBuilder("u:bBPxM9>qGJ");
        
        // Replace the first occurrence of the pattern "iStn&[Dx}1['$6)Lfs" with itself
        StrBuilder replaceFirst = strBuilder.replaceFirst("iStn&[Dx}1['$6)Lfs", "iStn&[Dx}1['$6)Lfs");
        
        // Assert that the capacity of the new StrBuilder object is 45
        assertEquals(45, replaceFirst.capacity());
        
        // Assert that the size of the new StrBuilder object is 13
        assertEquals(13, replaceFirst.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2StringsWithNullAndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        // Create a new StrBuilder with an initial capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder(32);
        
        // Use the replaceFirst method to remove the first occurrence of the null string from the StrBuilder
        StrBuilder replacedString = strBuilder.replaceFirst((String) null, "");
        
        // Assert that the resulting StrBuilder has a capacity of 32 characters
        assertEquals(32, replacedString.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking2Strings() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        String inputString = "MacBook Pro";
        strBuilder.append(inputString);
        
        // Act
        StrBuilder replaceAll = strBuilder.replaceAll("Mac", (String) null);
        
        // Assert
        assertEquals(32, replaceAll.capacity());
        assertEquals(inputString.length(), replaceAll.length());
        assertEquals(inputString, replaceAll.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking2StringsWithNull() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder replaceAll = strBuilder.replaceAll((String) null, (String) null);
        assertEquals(32, replaceAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsReplaceFirstTaking2Chars0() throws Throwable  {
        // This test case verifies the correctness of the method "replaceFirst" in the StrBuilder class.
        // It creates a new instance of the StrBuilder class and replaces the first occurrence of 'K' with 'n'.
        
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder replacedString = strBuilder.replaceFirst('K', 'n');
        assertEquals(32, replacedString.capacity()); // The capacity of the replaced string should be equal to 32.
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2CharsReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("y6$B0|+},D(bV");
        StrBuilder replaceFirst = strBuilder.replaceFirst('$', 'E');
        assertEquals(13, replaceFirst.length());
        assertEquals(45, replaceFirst.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsReplaceFirstTaking2Chars1() throws Throwable  {
        // Given: A string builder object with a capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When: We call the replaceFirst method on the string builder
        strBuilder.replaceFirst('Y', 'Y');
        
        // Then: The first occurrence of the character 'Y' is replaced with the character 'Y'
        assertEquals("Y", strBuilder.substring(0, 1));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking2CharsReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a String with spaces and special characters
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When we replace all spaces with commas
        StrBuilder replaceAll = strBuilder.replaceAll(' ', ',');
        
        // Then the resulting String has no spaces and special characters
        assertEquals(13, replaceAll.length());
        assertEquals(45, replaceAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking2CharsReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Setup
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // Action
        StrBuilder replaceAll = strBuilder.replaceAll('*', '*');
        
        // Assertions
        assertEquals(32, replaceAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceTaking3ArgumentsReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new StrBuilder with initial capacity of 1
        StrBuilder strBuilder = new StrBuilder(1);
        
        // Replace the substring starting at index 0 and ending at index 94 with null
        StrBuilder replace = strBuilder.replace(0, 94, (String) null);
        
        // Assert that the length of the replaced string is 0
        assertEquals(0, replace.length());
        
        // Assert that the capacity of the replaced string is 1
        assertEquals(1, replace.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingLong() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder append = strBuilder.append((-1L));
        strBuilder.replace(2, 42, ":v7U#OwAP2s?b2");
        append.insert(5, 710L);
        assertEquals(19, append.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking2StringsWithNullAndCreatesStrBuilderTakingString() throws Throwable  {
        // Test that StrBuilder can replace the first occurrence of a pattern with a null value and result in an empty string
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        strBuilder.replaceFirst(" 6$BZ|+H^D(bV", (String) null);
        assertTrue(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking2StringsReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder with the string "JAVA_1_8"
        StrBuilder strBuilder = new StrBuilder("JAVA_1_8");
        
        // When we call replaceAll with the argument "JAVA_1_8"
        StrBuilder replacedString = strBuilder.replaceAll("JAVA_1_8", "JAVA_1_8");
        
        // Then the resulting string should have a capacity of 40 and length of 8
        assertEquals(40, replacedString.capacity());
        assertEquals(8, replacedString.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingString() throws Throwable  {
        // Given a string builder initialized with the string "W"
        StrBuilder strBuilder = new StrBuilder("W");
        
        // When we check if it's empty
        assertFalse(strBuilder.isEmpty());
        
        // Then the result should be false, as the string builder is not empty
        assertEquals(0, strBuilder.length());
        
        // When we delete the first character of the string builder
        strBuilder.deleteFirst("W");
        
        // Then the length of the resulting string should be 0, as the string builder is now empty
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingStringWithNull() throws Throwable  {
        // Given an empty StrBuilder instance
        StrBuilder strBuilder = new StrBuilder();
        
        // When we call deleteFirst(null) on it
        StrBuilder deletedFirst = strBuilder.deleteFirst((String) null);
        
        // Then the capacity of the returned StrBuilder should be equal to 32
        assertEquals(32, deletedFirst.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingString() throws Throwable  {
        // Setup
        StrBuilder strBuilder = new StrBuilder("8");
        
        // Action
        strBuilder.deleteAll("8");
        
        // Assertion
        assertEquals(0, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingStringWithNull() throws Throwable  {
        // Given a string builder with some data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello");
        
        // When deleting all the characters of the string
        StrBuilder deleteAll = strBuilder.deleteAll((String) null);
        
        // Then the resulting string builder should have a capacity of 32
        assertEquals(32, deleteAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteFirstTakingCharReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a string builder with some initial content
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When we call the deleteFirst method with a character to remove
        strBuilder.deleteFirst('6');
        
        // Then the length of the string builder should be reduced by one character
        assertEquals(12, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingChar() throws Throwable  {
        // Given a string with many characters
        String input = "A long string with many characters";
        
        // When we delete all occurrences of the character 'J' from the string
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendFixedWidthPadRight(input, 97, 'J');
        strBuilder.deleteAll('J');
        
        // Then the resulting string should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTrimReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a string builder with an initial value of "[] "
        StrBuilder strBuilder = new StrBuilder("[] ");
        
        // When the trim method is called on the string builder
        strBuilder.trim();
        
        // Then the size of the string builder should be 2
        assertEquals(2, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder delete = strBuilder.delete(0, 95);
        assertEquals(32, delete.capacity());
        assertTrue(delete.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1WithTrue() throws Throwable  {
        // This test checks the behavior of the StrBuilder class when inserting a character at index 0 with insert() method.
        // The first argument of the method is set to true, which means that the new character will be inserted before all existing characters in the builder.
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.insert(0, 'a');
        strBuilder.insert(0, 'b');
        strBuilder.insert(0, 'c');
        strBuilder.insert(0, true);
        assertEquals(4, strBuilder.size());
        
        // The expected result is that the builder contains the string "abc".
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4Arguments() throws Throwable  {
        // Given a StrBuilder object with an initial capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When we insert a char array of length 0 at the beginning of the string builder
        char[] arg1 = new char[0];
        StrBuilder insert = strBuilder.insert(0, arg1, 0, 0);
        
        // Then the resulting StrBuilder object should have a capacity of 32
        assertEquals(32, insert.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder object with some initial data
        StrBuilder strBuilder = new StrBuilder("'Rd~CHa$");
        
        // When we insert a character array into the StrBuilder at a specific index
        char[] arg1 = new char[9];
        strBuilder.insert(4, arg1, 4, 4);
        
        // Then the size of the StrBuilder should be 12
        assertEquals(12, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsWithNegativeAndZero() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        char[] arg1 = new char[0];
        
        // Given
        int invalidLength = -3195;
        
        // When
        try {
        strBuilder.insert(0, arg1, 0, invalidLength);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsWithPositiveAndZero0() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        char[] arg1 = new char[0];
        try {
        strBuilder.insert(0, arg1, 32, 0);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // This is expected, as we are trying to insert a character at an invalid offset (32).
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsWithNegativeAndNegative() throws Throwable  {
        // Given a StrBuilder object with an empty string builder and some input data
        char[] arg1 = new char[0];
        
        // When we try to insert the input data at an invalid offset (-128)
        StrBuilder strBuilder = new StrBuilder();
        try {
        strBuilder.insert(0, arg1, (-128), (-128));
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then an exception should be thrown with the message "Invalid offset: -128"
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsWithNull() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When inserting null array into the StrBuilder at position 0
        StrBuilder insert = strBuilder.insert(0, (char[]) null, 0, 692);
        
        // Then the inserted string should have a length of 32 and capacity of 32
        assertEquals(32, insert.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking4ArgumentsWithPositiveAndZero1() throws Throwable  {
        // Given a StrBuilder object with no characters in it
        StrBuilder strBuilder = new StrBuilder();
        
        // When we try to insert 5 characters from an empty string array
        char[] arg1 = new char[0];
        try {
        strBuilder.insert(0, arg1, 0, 5);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then we expect an exception to be thrown with the message "Invalid length"
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1WithEmptyArray() throws Throwable  {
        // Create a new StrBuilder and initialize it with an empty char array
        StrBuilder strBuilder = new StrBuilder();
        char[] arg1 = new char[0];
        
        // Insert the char array into the StrBuilder at position 0
        StrBuilder insert = strBuilder.insert(0, arg1);
        
        // Assert that the capacity of the inserted string is equal to 32
        assertEquals(32, insert.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ReturningStrBuilderWhereSizeIsPositiveAndInsertTaking1And10() throws Throwable  {
        // Given: a string builder object and an array of characters
        StrBuilder strBuilder = new StrBuilder();
        char[] arg1 = new char[3];
        
        // When: the string builder is populated with the array of characters
        strBuilder.insert(0, arg1);
        
        // Then: the string builder is not empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ReturningStrBuilderWhereSizeIsZeroAndCreatesStrBuilderTakingString() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("");
        StrBuilder insert = strBuilder.insert(0, "");
        assertEquals(32, insert.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ReturningStrBuilderWhereSizeIsZeroAndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder insert = strBuilder.insert(0, (Object) null);
        assertEquals(32, insert.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ReturningStrBuilderWhereSizeIsPositiveAndInsertTaking1And11() throws Throwable  {
        // Create a new StrBuilder instance with the string "test"
        StrBuilder strBuilder = new StrBuilder("test");
        
        // Insert the string "test" at the beginning of the StrBuilder
        strBuilder.insert(0, (Object) "test");
        
        // Assert that the StrBuilder is not empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadRightTaking11And1WithNull() throws Throwable  {
        // Test that the StrBuilder appends null values correctly
        StrBuilder strBuilder = new StrBuilder(1012);
        strBuilder.appendFixedWidthPadRight((Object) null, 1012, 's');
        assertEquals(1012, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadRightTaking11And1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new StrBuilder instance
        StrBuilder arg0 = new StrBuilder();
        
        // Append the argument "arg0" to the builder with fixed width padding and right alignment
        StrBuilder appendFixedWidthPadRight = arg0.appendFixedWidthPadRight((Object) arg0, 0, '+');
        
        // Assert that the size of the builder is 0
        assertEquals(0, appendFixedWidthPadRight.size());
        
        // Assert that the capacity of the builder is 32
        assertEquals(32, appendFixedWidthPadRight.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadLeftTaking11And1ReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendFixedWidthPadLeft((Object) null, 42, 'o');
        assertEquals(84, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendPadding() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When the appendPadding method is called with a padding value of -764 and a character of 'D'
        StrBuilder appendPadding = strBuilder.appendPadding((-764), 'D');
        
        // Then the resulting capacity should be 32, since the padding value is negative and the string builder does not allow for negative capacities
        assertEquals(32, appendPadding.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking1And1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder appendSeparator = strBuilder.appendSeparator('u', (-1417));
        assertEquals(32, appendSeparator.capacity());
        assertEquals(0, appendSeparator.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking1And1WithEmptyString() throws Throwable  {
        // Setup
        StrBuilder strBuilder = new StrBuilder();
        
        // Call method
        StrBuilder appendSeparator = strBuilder.appendSeparator("", (-783));
        
        // Assertions
        assertEquals(32, appendSeparator.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking1And1ReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StringBuilder instance with some data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // When the appendSeparator method is called with a separator and a length
        strBuilder.appendSeparator("-", 1234);
        
        // Then the StringBuilder should contain the original data followed by the separator
        assertEquals(strBuilder.toString(), "Hello World" + "-");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking1And1WithNull() throws Throwable  {
        // Given a string builder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        
        // When we append a separator to the string builder
        strBuilder.appendSeparator((String) null, (-301));
        
        // Then the capacity of the string builder should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking2CharsWithOtherCharAndOtherChar() throws Throwable  {
        // Given a String Builder with a fixed string and separator
        StrBuilder strBuilder = new StrBuilder("2{rkXHU/AA79)");
        
        // When the length of the StringBuilder is calculated
        int length = strBuilder.length();
        
        // Then the length should be equal to 15
        assertEquals(15, length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTakingCharReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Create a new StrBuilder object with some initial value
        StrBuilder strBuilder = new StrBuilder("UA'Pc8o'JyE'VYJ#");
        
        // Append a separator to the string
        strBuilder.appendSeparator('p');
        
        // Assert that the size of the string is 17
        assertEquals(17, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking2Strings() throws Throwable  {
        // Given a StrBuilder object with some initial values
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendSeparator("os.arch", "x86_64");
        
        // When we call the size method on the StrBuilder object
        int actualSize = strBuilder.size();
        
        // Then the size of the StrBuilder object should be 6
        assertEquals(6, actualSize);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1ReturningStrBuilderWhereSizeIsPositive0() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        Locale.FilteringMode arg2 = Locale.FilteringMode.IGNORE_EXTENDED_RANGES;
        Locale.FilteringMode arg3 = Locale.FilteringMode.EXTENDED_FILTERING;
        EnumSet<Locale.FilteringMode> of = EnumSet.of(arg2, arg2, arg2, arg3);
        Iterator<Locale.FilteringMode> arg0 = of.iterator();
        strBuilder.appendWithSeparators(arg0, "Invalid offset: ");
        assertEquals(109, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1WithNullAndEmptyString() throws Throwable  {
        // Given: We have a StrBuilder object with an empty string as its separator
        StrBuilder strBuilder = new StrBuilder();
        
        // When: We call the appendWithSeparators method on the StrBuilder object with a null Iterator and an empty string as the separator
        strBuilder.appendWithSeparators((Iterator<?>) null, "");
        
        // Then: The capacity of the StrBuilder object should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1ReturningStrBuilderWhereSizeIsPositive1() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder();
        Locale.FilteringMode arg4 = Locale.FilteringMode.MAP_EXTENDED_RANGES;
        Locale.FilteringMode arg3 = Locale.FilteringMode.IGNORE_EXTENDED_RANGES;
        EnumSet<Locale.FilteringMode> arg0 = EnumSet.of(arg4, arg4, arg3, arg3, arg4);
        
        // When
        strBuilder.appendWithSeparators((Iterable<?>) arg0, "Pi_7?b^$bX7^,");
        
        // Then
        assertEquals(109, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder object with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When the appendWithSeparators method is called with a null Iterable argument and an empty separator string
        StrBuilder appendWithSeparators = strBuilder.appendWithSeparators((Iterable<?>) null, "");
        
        // Then the resulting StrBuilder object should have a capacity of 32
        assertEquals(32, appendWithSeparators.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingStringReturningZero() throws Throwable  {
        // Given a string builder with an initial capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // And an array of objects to be appended to the string builder
        Object[] args = new Object[2];
        
        // When we append these objects with separators using the "appendWithSeparators" method
        StrBuilder appendWithSeparators = strBuilder.appendWithSeparators(args, ",");
        
        // Then the resulting string builder should contain the appended strings separated by commas
        assertFalse(strBuilder.isEmpty());
        
        // And the "indexOf" method should return the index of the first occurrence of the separator character
        int indexOf = appendWithSeparators.indexOf(",");
        assertEquals(0, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1WithEmptyArray() throws Throwable  {
        // Given a StrBuilder object and an array of objects as input
        StrBuilder strBuilder = new StrBuilder();
        Object[] args = new Object[0];
        
        // When the appendWithSeparators method is called with the input array and a separator string
        StrBuilder result = strBuilder.appendWithSeparators(args, "2%!");
        
        // Then the capacity of the resulting StrBuilder object should be 32
        assertEquals(32, result.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendWithSeparatorsTaking1And1WithNull() throws Throwable  {
        // Create a new StrBuilder instance with initial capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // Call the appendWithSeparators method with null input and "u:G`h|" as separator
        StrBuilder appendWithSeparators = strBuilder.appendWithSeparators((Object[]) null, "u:G`h|");
        
        // Assert that the capacity of the returned StrBuilder instance is 32
        assertEquals(32, appendWithSeparators.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingIteratorReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // This test verifies that the StrBuilder class can append an iterator of Locale.FilteringMode values
        // and that the resulting string is not empty.
        StrBuilder strBuilder = new StrBuilder();
        Locale.FilteringMode arg2 = Locale.FilteringMode.REJECT_EXTENDED_RANGES;
        EnumSet<Locale.FilteringMode> of = EnumSet.of(arg2, arg2, arg2);
        Iterator<Locale.FilteringMode> arg0 = of.iterator();
        strBuilder.appendAll(arg0);
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingIteratorWithNull() throws Throwable  {
        // Test that appending all elements from a null iterator has no effect on the StrBuilder's capacity
        StrBuilder strBuilder = new StrBuilder();
        Iterator<?> nullIterator = null;
        StrBuilder appendAll = strBuilder.appendAll(nullIterator);
        assertEquals(32, appendAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingIterable() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder appendAll = strBuilder.appendAll((Iterable<?>) null);
        assertEquals(32, appendAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingObjectArray() throws Throwable  {
        // Given a string builder and an array of string builders
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder[] arg0 = new StrBuilder[2];
        
        // When we call the appendAll method with the array of string builders
        StrBuilder appendAll = strBuilder.appendAll(arg0);
        
        // Then the resulting string builder should have a capacity of 32
        assertEquals(32, appendAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingObjectArrayWithEmptyArray() throws Throwable  {
        // Given an empty string builder
        StrBuilder strBuilder = new StrBuilder();
        
        // And an array of Locale.FilteringMode objects
        Locale.FilteringMode[] filteringModes = new Locale.FilteringMode[0];
        
        // When we append all of the elements in the array to the string builder
        StrBuilder appendedAll = strBuilder.appendAll(filteringModes);
        
        // Then the resulting string should have a capacity of 32
        assertEquals(32, appendedAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendAllTakingObjectArrayWithNull() throws Throwable  {
        // Create a new StrBuilder instance with a capacity of 32 characters
        StrBuilder strBuilder = new StrBuilder(32);
        
        // Append all the Locale.FilteringMode values to the StrBuilder instance
        StrBuilder appendAll = strBuilder.appendAll((Locale.FilteringMode[]) null);
        
        // Check that the StrBuilder's capacity is 32 characters
        assertEquals(32, appendAll.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingBooleanWithFalse() throws Throwable  {
        // Test that the size of the string builder is 5 after appending false
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append(false);
        assertEquals(5, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsPositiveAndAppendTaking1And2Ints3() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Given a StrBuilder object with an empty string
        char[] arg0 = new char[3];
        strBuilder.append(arg0, 1, 1);
        // When the append method is called with a character array and a start index of 1
        assertEquals(1, strBuilder.size());
        // Then the size of the StrBuilder object should be 1
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithPositiveAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException1() throws Throwable  {
        // Given: A StrBuilder with a char array of length 0
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[0];
        
        // When: Trying to append the char array with an invalid length (50)
        try {
        strBuilder.append(arg0, 0, 50);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Then: A StringIndexOutOfBoundsException is thrown
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNonEmptyArray() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder(0);
        char[] arg0 = new char[1];
        
        // When
        try {
        strBuilder.append(arg0, 0, (-1939));
        } catch (StringIndexOutOfBoundsException e) {
        // Then
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException0() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[0];
        // Given a string builder with an empty string
        assertEquals("", strBuilder.toString());
        // When trying to append an empty string with a negative start index
        try {
        strBuilder.append(arg0, (-2233), (-2233));
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then an exception is thrown with the message "Invalid start index"
        assertEquals("Invalid start index", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharArrayWithNull() throws Throwable  {
        // Test that appending a null char array does not change the builder's capacity
        StrBuilder strBuilder = new StrBuilder();
        int initialCapacity = strBuilder.capacity();
        strBuilder.append((char[]) null);
        assertEquals(initialCapacity, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithZeroAndAppendTaking1And2IntsAndAppendTaking1And2Ints1() throws Throwable  {
        // No Comments were added
        StrBuilder arg0 = new StrBuilder();
        StrBuilder append = arg0.append(arg0, 0, 0);
        assertEquals(32, append.capacity());
        assertEquals(0, append.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithZero() throws Throwable  {
        // No Comments were added
        StrBuilder arg0 = new StrBuilder(0);
        // Undeclared exception!
        try { 
          arg0.append(arg0, 0, 9);
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
           //
           // length must be valid
           //
           verifyException("org.apache.commons.lang3.text.StrBuilder", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndCreatesStrBuilderTakingInt() throws Throwable  {
        StrBuilder arg0 = new StrBuilder((-532));
        // Undeclared exception!
        try {
        arg0.append(arg0, 0, (-532));
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        //
        // length must be valid
        //
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndAppendTaking1And2IntsWithPositiveAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException() throws Throwable  {
        // Given a StringBuilder object with some data
        StrBuilder arg0 = new StrBuilder();
        arg0.append("Some string");
        
        try {
        // When an invalid startIndex is passed as argument to append method
        arg0.append(arg0, (-3356), 9);
        
        // Then a StringIndexOutOfBoundsException is thrown
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Expected behavior
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNullAndAppendTaking1And2IntsAndAppendTaking1And2Ints0() throws Throwable  {
        // Test that appending a null StrBuilder returns a new StrBuilder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder append = strBuilder.append((StrBuilder) null, 1053, 1053);
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStrBuilderReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        String arg0 = "Index: 0";
        
        // Act
        strBuilder.append(arg0);
        
        // Assert
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStrBuilderWithNull() throws Throwable  {
        // Test that appending a null StrBuilder results in an empty StrBuilder with the correct capacity
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder append = strBuilder.append((StrBuilder) null);
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking1And2IntsThrowsStringIndexOutOfBoundsException() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        StringBuilder arg0 = new StringBuilder(98);
        
        try {
        // This will throw a StringIndexOutOfBoundsException as the index is out of bounds.
        strBuilder.appendln(arg0, 0, 98);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // The length must be valid.
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException0() throws Throwable  {
        // Given
        StringBuilder arg0 = new StringBuilder();
        StrBuilder strBuilder = new StrBuilder((-2048));
        
        // When
        try {
        strBuilder.append(arg0, 337, (-2048));
        } catch (StringIndexOutOfBoundsException e) {
        // Then
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException1() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder();
        StringBuilder arg0 = new StringBuilder("test");
        
        // When
        try {
        strBuilder.append(arg0, -2048, -2048);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException1() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder((-403));
        StringBuilder arg0 = new StringBuilder((CharSequence) "JAVA__9");
        // Given: A string builder with a negative length
        // When: Trying to append a substring from the argument string
        // Then: An exception should be thrown because the substring is out of bounds
        try {
        strBuilder.append(arg0, 2, (-2350));
        fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        //
        // length must be valid
        //
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBuilderReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Given a StrBuilder object with an initial capacity of 32 characters
        // and a StringBuilder object that will be appended to the StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        StringBuilder arg0 = new StringBuilder();
        
        // When the append method is called on the StrBuilder with the StringBuilder argument
        StrBuilder append = strBuilder.append(arg0);
        
        // Then the capacity of the StrBuilder should be 32 characters
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBuilder() throws Throwable  {
        // Test that the StrBuilder class can correctly append a string to an empty instance of StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        StringBuilder arg0 = new StringBuilder("org.apache.commons.lang3.ArrayUtils");
        StrBuilder append = strBuilder.append(arg0);
        assertFalse(strBuilder.isEmpty()); // Verify that the appended string is not empty
        int lastIndexOf = append.lastIndexOf("h8yY*cn2kijSOWI_", 1441);
        assertEquals(-1, lastIndexOf); // Verify that the last index of the substring in the appended string is -1
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsThrowsStringIndexOutOfBoundsExceptionAndAppendTaking1And2Ints0() throws Throwable  {
        // Tests that an exception is thrown when attempting to append a string tokenizer with invalid indices
        StringBuilder strBuilder = new StringBuilder();
        StringBuffer arg0 = new StringBuffer("org.apache.commons.lang3.text.StrBuilder$StrBuilderTokenizer");
        try {
        strBuilder.append(arg0, 34, 34);
        } catch (StringIndexOutOfBoundsException e) {
        // The length must be valid
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndPositive0() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder();
        StringBuffer arg0 = new StringBuffer("2<pIYEKt&6?");
        
        // When
        strBuilder.append(arg0, 2, (-1));
        
        // Then
        fail("Expecting exception: StringIndexOutOfBoundsException");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithStringBufferWhereLengthIsZero() throws Throwable  {
        // Given a StrBuilder instance with a valid buffer size
        final int validBufferSize = 1024;
        StrBuilder strBuilder = new StrBuilder(validBufferSize);
        
        // And a StringBuffer instance with a valid length
        StringBuffer arg0 = new StringBuffer(1277);
        
        try {
        // When the append method is called with an invalid start index
        strBuilder.append(arg0, 1277, 1277);
        
        // Then a StringIndexOutOfBoundsException should be thrown
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        //
        // startIndex must be valid
        //
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndPositive1() throws Throwable  {
        // Given a string builder and a string buffer with some data
        StrBuilder strBuilder = new StrBuilder();
        StringBuffer arg0 = new StringBuffer("xv}:.P$=)M2PA");
        
        // When we try to append the string buffer using a negative index and length
        try {
        strBuilder.append(arg0, (-872), 1230);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then we should get a string index out of bounds exception because the start index is negative
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsReturningStrBuilderWhereSizeIsZeroAndCreatesStrBuilderTakingNoArguments() throws Throwable  {
        // Given: A StrBuilder object with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When: The append method is called with a null string buffer and a negative length
        StrBuilder append = strBuilder.append((StringBuffer) null, (-179), (-179));
        
        // Then: The capacity of the returned StrBuilder object should be 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBuffer() throws Throwable  {
        // Given a StrBuilder with a null StringBuffer
        StrBuilder strBuilder = new StrBuilder();
        
        // When appending a null StringBuffer
        StrBuilder append = strBuilder.append((StringBuffer) null);
        
        // Then the returned instance should have a capacity of 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsThrowsStringIndexOutOfBoundsExceptionAndAppendTaking1And2Ints1() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder();
        
        // When
        try {
        strBuilder.append("y=?I>Lk&?@", 0, 10000);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        
        // Then
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNegativeAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException2() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Undeclared exception!
        try {
        strBuilder.append("Drn1':t+B).", 5, (-850));
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        //
        // length must be valid
        //
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithPositiveAndAppendTaking1And2IntsThrowsStringIndexOutOfBoundsException2() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        try {
        strBuilder.append("A", 2, 1);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // This is expected, since startIndex must be valid
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithEmptyStringAndNegative() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder(-786);
        try {
        strBuilder.append("", -481, 0);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // This is expected, since startIndex must be valid
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTaking1And2IntsWithNullAndAppendTaking1And2IntsAndAppendTaking1And2Ints1() throws Throwable  {
        // Given a string builder with a capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a substring to the string builder with a start and end index
        StrBuilder append = strBuilder.append((String) null, 3755, 3755);
        
        // Then the capacity of the string builder should be unchanged
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringWithNull() throws Throwable  {
        // Given a string builder with initial capacity of 32
        StrBuilder strBuilder = new StrBuilder(32);
        
        // When appending a null string to the string builder
        StrBuilder append = strBuilder.append((String) null);
        
        // Then the resulting string builder has a capacity of 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharSequenceReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Create a new String Builder and append a null string
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder append = strBuilder.append((CharSequence) null);
        
        // Verify the capacity of the appended string builder is equal to 32
        assertEquals(32, append.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingCharSequenceReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        
        // Build a string using the StrBuilder class
        strBuilder.append("This is a string");
        
        // Check that the built string is not empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendNullReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Create a new StrBuilder with the default capacity
        StrBuilder strBuilder = new StrBuilder();
        
        // Set the null text for the StrBuilder
        StrBuilder setNullText = strBuilder.setNullText("CQ*>Y m]p-J~z");
        
        // Append a null value to the StrBuilder
        setNullText.appendNull();
        
        // Assert that the StrBuilder is not empty after appending a null value
        assertFalse(setNullText.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking1And2IntsAndCreatesStrBuilderTakingStringAndAppendTakingObject() throws Throwable  {
        StrBuilder testString = new StrBuilder("&>vzPe)6='hz3");
        testString.append((Object) "&>vzPe)6='hz3");
        testString.appendln(testString, 16, 16);
        assertEquals(112, testString.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTaking4ArgumentsThrowsStringIndexOutOfBoundsExceptionAndAppendFixedWidthPadRightTaking11And1() throws Throwable  {
        // Given: A StrBuilder instance and a char array with a length of 32
        StrBuilder strBuilder = new StrBuilder();
        char[] arg2 = new char[32];
        
        // When: We attempt to call the getChars method with an end index that is less than the start index
        try {
        strBuilder.getChars(1154, 32, arg2, 0);
        fail("Expected StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then: We expect the method to throw a StringIndexOutOfBoundsException
        assertTrue(e.getMessage().contains("end < start"));}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTaking4ArgumentsWithNegativeAndNegative() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        char[] arg2 = new char[1];
        // Undeclared exception!
        try { 
          strBuilder.getChars(755, (-4061), arg2, (-4061));
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
           //
           // String index out of range: -4061
           //
           verifyException("org.apache.commons.lang3.text.StrBuilder", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTaking4ArgumentsWithPositive() throws Throwable  {
        // Test that getChars throws an exception when the specified range is invalid.
        StrBuilder strBuilder = new StrBuilder();
        try {
        strBuilder.getChars((-650), (-701), (char[]) null, 1342);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        // Verify that the correct exception is thrown.
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTaking4ArgumentsThrowsStringIndexOutOfBoundsException() throws Throwable  {
        // Given a StrBuilder instance and an array of characters to fill with the contents of the StrBuilder
        StrBuilder strBuilder = new StrBuilder();
        char[] arg2 = new char[3];
        
        // When the getChars method is called with invalid arguments
        try {
        strBuilder.getChars(1154, 32, arg2, 0);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then a StringIndexOutOfBoundsException should be thrown
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTakingCharArrayReturningNonEmptyArray() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        char[] arg0 = new char[0];
        
        // Act
        strBuilder.insert(0, false);
        strBuilder.getChars(arg0);
        
        // Assert
        assertEquals(5, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsTakingCharArrayReturningEmptyArray() throws Throwable  {
        // Given a StrBuilder with default capacity
        StrBuilder sb = new StrBuilder();
        
        // When the getChars method is called with null as an argument
        char[] chars = sb.getChars(null);
        
        // Then the length of the returned array should be 0
        assertEquals(0, chars.length);
        
        // And the capacity of the StrBuilder should be 32
        assertEquals(32, sb.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToCharArrayTaking2ArgumentsReturningEmptyArray() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        char[] charArray = strBuilder.toCharArray(0, 1);
        assertEquals(0, charArray.length);
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToCharArrayTakingNoArgumentsReturningEmptyArray() throws Throwable  {
        // Given a String Builder with default capacity of 16
        StrBuilder strBuilder = new StrBuilder();
        
        // When the capacity is increased to 32
        strBuilder.toCharArray();
        
        // Then the capacity should be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToCharArrayTakingNoArgumentsReturningNonEmptyArray() throws Throwable  {
        // Given a StrBuilder with initial capacity of 34
        StrBuilder strBuilder = new StrBuilder("JD");
        
        // When the toCharArray method is called
        char[] charArray = strBuilder.toCharArray();
        
        // Then the length of the returned array should be 2
        assertEquals(2, charArray.length);
        
        // And the contents of the array should match the original string
        assertArrayEquals(new char[] {'J', 'D'}, charArray);
        
        // And the capacity of the StrBuilder should still be 34
        assertEquals(34, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteCharAtReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder object with a fixed width of 97 characters and some initial string data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendFixedWidthPadRight((Object) "This is a longer string", 97, 'J');
        
        // When the first character is deleted from the StrBuilder object
        strBuilder.deleteCharAt(0);
        
        // Then the capacity of the StrBuilder should be reduced to 194
        assertEquals(194, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteCharAtThrowsStringIndexOutOfBoundsException() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // When
        try {
        strBuilder.deleteCharAt(1);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then
        assertEquals("String index out of range: 1", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteCharAtWithNegative() throws Throwable  {
        // Test that a StringIndexOutOfBoundsException is thrown when attempting to delete a character at an index less than 0
        // Given a StrBuilder instance with some text
        StrBuilder strBuilder = new StrBuilder();
        
        // When attempting to delete a character at an index less than 0
        try {
        strBuilder.deleteCharAt(-1);
        
        // Then a StringIndexOutOfBoundsException is thrown
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCharAt() throws Throwable  {
        // Given a StrBuilder object with a string of length 8 and capacity 40.
        StrBuilder strBuilder = new StrBuilder("<#j[s7HF");
        
        // When setCharAt is called with the index 0 and the character 'R'.
        StrBuilder setCharAt = strBuilder.setCharAt(0, 'R');
        
        // Then the length of the string should be 8.
        assertEquals(8, strBuilder.length());
        
        // And the capacity of the string should be 40.
        assertEquals(40, setCharAt.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCharAtWithAlphabeticChar() throws Throwable  {
        // Given: A new instance of StrBuilder and a valid character
        StrBuilder strBuilder = new StrBuilder();
        char c = 'a';
        
        // When: Setting the character at an index that is out of range
        try {
        strBuilder.setCharAt(0, c);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        // Then: The correct exception is thrown with the expected message
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCharAtWithNegative() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        
        // Given a StrBuilder instance with some initial value
        String initialValue = "This is an initial value";
        strBuilder.append(initialValue);
        
        // When attempting to set the character at an index that is out of bounds
        int indexOutOfBounds = initialValue.length() + 1;
        try {
        strBuilder.setCharAt(indexOutOfBounds, 'u');
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Then the expected exception is thrown with a message indicating the index out of bounds
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharAtThrowsStringIndexOutOfBoundsException() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        
        // Given a String with 10 characters
        assertEquals(10, strBuilder.length());
        
        // When calling charAt with an index that is out of range (32)
        try {
        strBuilder.charAt(32);
        
        // Then an exception should be thrown
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Verify that the correct exception is thrown with the correct message
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharAtWithNegative() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        try {
        // Verify that an exception is thrown when the index is negative
        strBuilder.charAt((-547));
        fail("Expecting StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Verify that the correct exception is thrown and its message
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);
        assertEquals("String index out of range: -547", e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendSeparatorTaking2StringsWithNull() throws Throwable  {
        // Given
        StrBuilder arg0 = new StrBuilder();
        
        // When
        arg0.appendFixedWidthPadRight((Object) arg0, 68, 'J');
        
        // Then
        assertEquals(136, arg0.capacity());
        assertEquals(68, arg0.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendTakingStringBufferReturningStrBuilderWhereCapacityIsZero() throws Throwable  {
        // Given: A StrBuilder with a capacity of 32 and an empty string buffer.
        StrBuilder strBuilder = new StrBuilder();
        assertEquals(32, strBuilder.capacity());
        StringBuffer nullStringBuffer = null;
        
        // When: The minimizeCapacity method is called and the append method is called with a null StringBuffer.
        strBuilder.minimizeCapacity();
        strBuilder.append((StringBuffer) null);
        
        // Then: The capacity of the StrBuilder should be 0, as the StringBuffer is null.
        assertEquals(0, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetLengthReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // No Comments were added
        StrBuilder strBuilder = new StrBuilder();
        StrBuilder setLength = strBuilder.setLength(0);
        assertEquals(32, setLength.capacity());
        assertTrue(setLength.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetLengthThrowsStringIndexOutOfBoundsException() throws Throwable  {
        StrBuilder strBuilder = new StrBuilder();
        // Given a string builder with no initial length
        
        try {
        // When trying to set the length of the string builder to a negative value
        strBuilder.setLength(-128);
        
        // Then an exception is thrown with the message "String index out of range: -128"
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch(StringIndexOutOfBoundsException e) {
        // Verify that the correct exception was thrown
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetLengthReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder with an initial length of 2070
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.setLength(2070);
        
        // When the length is set to 1734
        strBuilder.setLength(1734);
        
        // Then the isEmpty method should return false
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetNullTextWithNull() throws Throwable  {
        // Set up the test environment
        StrBuilder strBuilder = new StrBuilder();
        
        // Execute the code under test
        StrBuilder setNullText = strBuilder.setNullText((String) null);
        
        // Verify the results
        assertEquals(32, setNullText.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWriteTakingInt() throws Throwable  {
        // Given a StrBuilder instance with a capacity of 32
        StrBuilder arg0 = new StrBuilder((-786));
        
        // When creating a new StrBuilderWriter instance using the StrBuilder's method "new"
        StrBuilder.StrBuilderWriter strBuilder_StrBuilderWriter = arg0.new StrBuilderWriter();
        
        // Then
        assertFalse(arg0.isEmpty()); // The StrBuilder is not empty
        assertEquals(32, arg0.capacity()); // The StrBuilder's capacity is 32
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWriteTakingString() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder arg0 = new StrBuilder();
        StrBuilder.StrBuilderWriter strBuilder_StrBuilderWriter = arg0.new StrBuilderWriter();
        strBuilder_StrBuilderWriter.write("");
        assertEquals(32, arg0.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWriteTaking3Arguments() throws Throwable  {
        // Create a new StrBuilder instance with the default capacity of 16 characters
        StrBuilder arg0 = new StrBuilder();
        
        // Use the StrBuilderWriter class to write a string value to the StrBuilder instance
        StrBuilder.StrBuilderWriter strBuilder_StrBuilderWriter = arg0.new StrBuilderWriter();
        strBuilder_StrBuilderWriter.write("java.vm.specification.version", 4, 4);
        
        // Assert that the size of the StrBuilder instance is equal to 4 characters
        assertEquals(4, arg0.size());
        
        // Assert that the StrBuilder instance is not empty
        assertFalse(arg0.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCloseAndCreatesStrBuilderTakingNoArgumentsAndCreatesStrBuilderWriterTakingStrBuilder() throws Throwable  {
        // Create a new StrBuilder object with default capacity (32)
        StrBuilder arg0 = new StrBuilder();
        
        // Create a new writer for the StrBuilder object
        StrBuilder.StrBuilderWriter strBuilder_StrBuilderWriter = arg0.new StrBuilderWriter();
        
        // Close the writer to prevent any further writes to the buffer
        strBuilder_StrBuilderWriter.close();
        
        // Assert that the capacity of the StrBuilder is 32, as expected
        assertEquals(32, arg0.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFlush() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder arg0 = new StrBuilder("java.vm.name");
        StrBuilder.StrBuilderWriter strBuilder_StrBuilderWriter = arg0.new StrBuilderWriter();
        strBuilder_StrBuilderWriter.flush();
        assertEquals(44, arg0.capacity());
        assertEquals(12, arg0.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTakingIntReturningNonEmptyString() throws Throwable  {
        StrBuilder arg0 = new StrBuilder();
        
        // Create a new instance of the StrBuilder class
        arg0.appendln(arg0);
        
        // Add the current contents of the StrBuilder to itself, effectively doubling its size
        arg0.substring(0);
        
        // Extract a substring from the current contents of the StrBuilder, starting at index 0 and ending at the end of the string
        assertFalse(arg0.isEmpty());
        
        // Verify that the string is not empty
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingStrMatcherReturningZero() throws Throwable  {
        // Given a StrBuilder with some content and a trim matcher
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        StrMatcher arg0 = StrMatcher.trimMatcher();
        
        // When we call the indexOf method with the trim matcher
        int indexOf = strBuilder.indexOf(arg0);
        
        // Then the method should return the index of the first occurrence of the trim matcher in the string
        assertEquals(0, indexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1ThrowsStringIndexOutOfBoundsExceptionAndInsertTaking1And11() throws Throwable  {
        // Given a StrBuilder object with some initialized data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // When I try to insert a character at an out-of-bounds index
        try {
        strBuilder.insert(5, 710L);
        fail("Expecting exception: StringIndexOutOfBoundsException");
        } catch (StringIndexOutOfBoundsException e) {
        // Then I expect a StringIndexOutOfBoundsException to be thrown
        verifyException("org.apache.commons.lang3.text.StrBuilder", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAsWriter() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("'Rd~CHa$");
        strBuilder.asWriter();
        assertEquals(8, strBuilder.length());
        assertEquals(40, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingString() throws Throwable  {
        // Given a StrBuilder object
        StrBuilder strBuilder = new StrBuilder();
        
        // When we append a string to it
        strBuilder.appendln("Functional");
        
        // Then the length of the resulting string is greater than 0
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingLong() throws Throwable  {
        // Given a string builder with initial capacity of 1
        StrBuilder strBuilder = new StrBuilder(1);
        
        // When we append the value "1" to the string builder
        strBuilder.appendln((long) 1);
        
        // Then the capacity of the string builder should be increased to 4
        assertEquals(4, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadRightTaking2IntsAnd1ReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder instance with no fixed width pad right
        StrBuilder strBuilder = new StrBuilder();
        
        // When appending a fixed width pad right with value '9' and length of 1
        strBuilder.appendFixedWidthPadRight(1, 1, '9');
        
        // Then the resulting string should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking1And2IntsAndAppendlnTaking1And2Ints1() throws Throwable  {
        // Given a StrBuilder and a StringBuffer containing some text
        StrBuilder strBuilder = new StrBuilder();
        StringBuffer arg0 = new StringBuffer("Hello World");
        
        // When the StrBuilder's appendln method is called with the StringBuffer as an argument
        strBuilder.appendln(arg0, 0, 0);
        
        // Then the StrBuilder should not be empty and contain the text from the StringBuffer
        assertFalse(strBuilder.isEmpty());
        assertEquals("Hello World", strBuilder.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingCharReturningNegative() throws Throwable  {
        // Test the StrBuilder class with a simple string
        StrBuilder strBuilder = new StrBuilder();
        
        // Check the initial capacity of the StrBuilder
        assertEquals(32, strBuilder.capacity());
        
        // Check the lastIndexOf method with a character that is not present in the string
        int lastIndexOf = strBuilder.lastIndexOf('r');
        assertEquals(-1, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringBuilder() throws Throwable  {
        // Given a StrBuilder instance with an initial capacity of 32
        StrBuilder strBuilder = new StrBuilder();
        
        // When the toStringBuilder method is called on the StrBuilder instance
        StringBuilder stringBuilder = strBuilder.toStringBuilder();
        
        // Then the resulting StringBuilder should be empty
        assertEquals("", stringBuilder.toString());
        
        // And the capacity of the StrBuilder instance should still be 32
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingChar() throws Throwable  {
        // Given an empty string builder
        StrBuilder strBuilder = new StrBuilder();
        
        // When the isEmpty method is called
        boolean isEmpty = strBuilder.isEmpty();
        
        // Then the return value should be true
        assertTrue(isEmpty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToCharArrayTaking2ArgumentsReturningNonEmptyArray() throws Throwable  {
        // Given a StrBuilder object with some initial value
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendln(12345.6789);
        
        // When the toCharArray method is called on the StrBuilder object
        char[] chars = strBuilder.toCharArray(2, 80);
        
        // Then the length of the resulting character array should be 11
        assertEquals(11, chars.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking1And2IntsAndAppendlnTaking1And2Ints2() throws Throwable  {
        // Given a StrBuilder object
        StrBuilder strBuilder = new StrBuilder();
        
        // When appending a non-null string to it
        strBuilder.appendln((StringBuilder) null, 490, 490);
        
        // Then the resulting string should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingNoArgumentsAndCallsInsertTaking1And1() throws Throwable  {
        // Given a StrBuilder object with the initial value "0"
        StrBuilder strBuilder = new StrBuilder("0");
        
        // When the insert method is called with a float value of 0
        strBuilder.insert(0, (float) 0);
        
        // Then the size of the StrBuilder should be 3
        assertEquals(3, strBuilder.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceFirstTaking1And1() throws Throwable  {
        // Given a string builder with a capacity of 40 and a length of 8
        StrBuilder strBuilder = new StrBuilder(".70BVt=V");
        assertEquals(40, strBuilder.capacity());
        assertEquals(8, strBuilder.length());
        
        // When calling the replaceFirst method with a tab matcher and replacement string
        StrMatcher arg0 = StrMatcher.tabMatcher();
        StrBuilder replaced = strBuilder.replaceFirst(arg0, "|uJyFMSV`ruboz%");
        
        // Then the resulting string builder should have a capacity of 40 and a length of 8
        assertEquals(40, replaced.capacity());
        assertEquals(8, replaced.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNewLineTextReturningNull() throws Throwable  {
        // Given: a StrBuilder object is created with some initial text and capacity.
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When: the getNewLineText() method is called on the StrBuilder object.
        strBuilder.getNewLineText();
        
        // Then: the length of the string should be 13, and the capacity of the string should be 45.
        assertEquals(13, strBuilder.length());
        assertEquals(45, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBuildReturningNonEmptyString() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder("'Rd~CHa$");
        String build = strBuilder.build();
        assertEquals("'Rd~CHa$", build);
        assertEquals(40, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendFixedWidthPadLeftTaking2IntsAnd1ReturningStrBuilderWhereSizeIsZero() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        
        // Act
        StrBuilder appendFixedWidthPadLeft = strBuilder.appendFixedWidthPadLeft(-1993, -1993, 'g');
        
        // Assert
        assertEquals(32, appendFixedWidthPadLeft.capacity());
        assertTrue(appendFixedWidthPadLeft.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIndexOfTakingCharReturningPositive() throws Throwable  {
        // Given a StrBuilder with some initial data
        StrBuilder strBuilder = new StrBuilder("+Y9iQ16O1]w{");
        
        // When we call indexOf('9') on the StrBuilder
        int indexOf = strBuilder.indexOf('9');
        
        // Then we expect to find the first occurrence of '9' at position 2
        assertEquals(2, indexOf);
        
        // And we expect the length of the StrBuilder to be 12
        assertEquals(12, strBuilder.length());
        
        // And we expect the capacity of the StrBuilder to be 44
        assertEquals(44, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceAllTaking1And1ReturningStrBuilderWhereSizeIsPositive() throws Throwable  {
        // Given a StrBuilder object with the value "java.vm.name"
        StrBuilder strBuilder = new StrBuilder("java.vm.name");
        
        // When we create a new StringMatcher instance that matches the string "M"
        StrMatcher.StringMatcher arg0 = new StrMatcher.StringMatcher("M");
        
        // And when we replace all occurrences of "M" in the StrBuilder object with "java.vm.name"
        StrBuilder replacedString = strBuilder.replaceAll((StrMatcher) arg0, "java.vm.name");
        
        // Then the length of the replaced string should be 12
        assertEquals(12, replacedString.length());
        
        // And the capacity of the replaced string should be 44
        assertEquals(44, replacedString.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTaking2Arguments() throws Throwable  {
        // Given: A StrBuilder instance with some data
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendln("This is a string with some characters like a, b and c.", (Object[]) null);
        
        // When: The appendln method is called with a String and a null args
        strBuilder.appendln("This is another string with some characters like d, e and f.", (Object[]) null);
        
        // Then: The StrBuilder instance should not be empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInsertTaking1And1AndInsertTaking1And1() throws Throwable  {
        // Given a StrBuilder with initial capacity 0
        StrBuilder strBuilder = new StrBuilder(0);
        
        // When we insert the character 'z' at index 0
        strBuilder.insert(0, 'z');
        
        // Then the StrBuilder is not empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringBufferReturningStringBufferWhereLengthIsZero() throws Throwable  {
        // Given a string builder with capacity 3574
        StrBuilder strBuilder = new StrBuilder(3574);
        
        // When converting the string builder to a string buffer
        StringBuffer stringBuffer = strBuilder.toStringBuffer();
        
        // Then the resulting string buffer should be empty
        assertEquals("", stringBuffer.toString());
        
        // And the capacity of the string builder should be 3574
        assertEquals(3574, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingObject() throws Throwable  {
        // Create a new StrBuilder instance and append a null value.
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendln((Object) null);
        
        // Assert that the StrBuilder is not empty after appending a null value.
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSizeReturningZero() throws Throwable  {
        // Arrange
        StrBuilder strBuilder = new StrBuilder();
        
        // Act
        int size = strBuilder.size();
        int capacity = strBuilder.capacity();
        
        // Assert
        assertEquals(32, capacity);
        assertEquals(0, size);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStrMatcherReturningPositive() throws Throwable  {
        // Given a StrBuilder with some content
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        
        // When I call lastIndexOf with a StrMatcher that matches the substring " 6$BZ|+H^D(bV"
        int lastIndexOf = strBuilder.lastIndexOf(StrMatcher.charSetMatcher(" 6$BZ|+H^D(bV"));
        
        // Then the method should return the index of the last occurrence of that substring in the StrBuilder
        assertEquals(13, strBuilder.length());
        assertEquals(45, strBuilder.capacity());
        assertEquals(12, lastIndexOf);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCapacity() throws Throwable  {
        // Given a string builder with default capacity
        StrBuilder strBuilder = new StrBuilder();
        
        // When the capacity of the string builder is requested
        int actualCapacity = strBuilder.capacity();
        
        // Then the capacity should be 32 by default
        assertEquals(32, actualCapacity);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLastIndexOfTakingStringReturningPositive() throws Throwable  {
        // Given a StrBuilder instance with a specific string and capacity
        StrBuilder strBuilder = new StrBuilder(" 6$BZ|+H^D(bV");
        int expectedCapacity = 45;
        int expectedLastIndexOf = 12;
        int expectedLength = 13;
        
        // When the lastIndexOf method is called with a specific character
        int lastIndexOf = strBuilder.lastIndexOf("");
        
        // Then the correct last index of the character is returned
        assertEquals(expectedLastIndexOf, lastIndexOf);
        
        // And the capacity and length of the StrBuilder are as expected
        assertEquals(expectedCapacity, strBuilder.capacity());
        assertEquals(expectedLength, strBuilder.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingBoolean() throws Throwable  {
        // Given: A StringBuilder object "strBuilder" is created and initialized with a value of "true".
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.appendln(true);
        
        // When: The "isEmpty()" method is called on the StringBuilder object.
        boolean isEmpty = strBuilder.isEmpty();
        
        // Then: The result of the call to "isEmpty()" should be "false" since the StringBuildeer object is not empty.
        assertFalse(isEmpty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNullTextReturningNull() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.getNullText();
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAppendlnTakingStringBuilder() throws Throwable  {
        // Test that the appendln method does not throw a NullPointerException when given a null value
        StrBuilder strBuilder = new StrBuilder();
        assertDoesNotThrow(() -> strBuilder.appendln((StringBuilder) null));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeleteAllTakingCharWithDigit() throws Throwable  {
        // Given the fact that we have a StrBuilder object and some data to work with
        StrBuilder strBuilder = new StrBuilder();
        String input = "123456789";
        
        // When we append some data to the StrBuilder object
        strBuilder.appendln(input);
        
        // Then we delete all occurrences of a specific character in the data
        strBuilder.deleteAll('3');
        
        // And assert that the resulting string is not empty
        assertFalse(strBuilder.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesStrBuilderTakingIntAndCallsAppendlnTaking1And2Ints() throws Throwable  {
        // Given
        StrBuilder strBuilder = new StrBuilder(1);
        strBuilder.appendln("r-#oy.", 1, 1);
        
        // When
        boolean isEmpty = strBuilder.isEmpty();
        
        // Then
        assertFalse(isEmpty);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubstringTakingIntReturningEmptyString() throws Throwable  {
        // Setup
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.append("Hello World");
        
        // Execute
        String substring = strBuilder.substring(0);
        
        // Verify
        assertEquals(32, strBuilder.capacity());
        assertEquals("Hello World", substring);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMarkSupported() throws Throwable  {
        // Given a string builder with some initial data
        StrBuilder arg0 = new StrBuilder();
        arg0.append("This is a test");
        
        // When reading from the string builder reader
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        
        // Then marks are supported
        assertTrue(strBuilder_StrBuilderReader.markSupported());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMark() throws Throwable  {
        // Given a StrBuilder object with capacity 41 and length 9
        StrBuilder arg0 = new StrBuilder("Windows 9");
        
        // When the StrBuilderReader is created from the StrBuilder
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        
        // Then the StrBuilderReader's mark should be set to the position 97
        strBuilder_StrBuilderReader.mark(97);
        
        // And the capacity of the StrBuilder should still be 41
        assertEquals(41, arg0.capacity());
        
        // And the length of the StrBuilder should still be 9
        assertEquals(9, arg0.length());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReset() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder arg0 = new StrBuilder();
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        strBuilder_StrBuilderReader.reset();
        assertFalse(strBuilder_StrBuilderReader.ready());
        assertEquals(32, arg0.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCloseAndCreatesStrBuilderTakingStringAndCreatesStrBuilderReaderTakingStrBuilder() throws Throwable  {
        // Create a new StrBuilder instance with a null value for the string argument
        StrBuilder arg0 = new StrBuilder((String) null);
        
        // Create a reader object for the StrBuilder instance
        StrBuilder.StrBuilderReader strBuilder_StrBuilderReader = arg0.new StrBuilderReader();
        
        // Close the reader object to free up any resources it is using
        strBuilder_StrBuilderReader.close();
        
        // Assert that the StrBuilder has a capacity of 32 characters
        assertEquals(32, arg0.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAsReader() throws Throwable  {
        // rollbacked to evosuite
        StrBuilder strBuilder = new StrBuilder();
        strBuilder.asReader();
        assertEquals(32, strBuilder.capacity());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAsTokenizer() throws Throwable  {
        // Given a new StrBuilder instance
        StrBuilder strBuilder = new StrBuilder();
        
        // When we call the asTokenizer method on the StrBuilder instance
        strBuilder.asTokenizer();
        
        // Then we expect the capacity to be set to its default value of 32
        assertEquals(32, strBuilder.capacity());
    }
  }
  