content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 14:48:00 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.text.Format;
  import java.util.HashMap;
  import java.util.Locale;
  import org.apache.commons.lang3.text.ExtendedMessageFormat;
  import org.apache.commons.lang3.text.FormatFactory;
  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 ExtendedMessageFormat_Original_ESTest extends ExtendedMessageFormat_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTaking3Arguments() throws Throwable  {
        Locale arg1 = Locale.SIMPLIFIED_CHINESE;
        HashMap<String, FormatFactory> arg2 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("b EH^-aK", arg1, arg2);
        assertEquals("b EH^-aK", extendedMessageFormat.toPattern());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTaking2Arguments() throws Throwable  {
        Locale arg1 = Locale.KOREA;
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("", arg1);
        assertEquals("", extendedMessageFormat.toPattern());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToPatternReturningNonEmptyString() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("mi6U|S0<6R", arg1);
        String pattern = extendedMessageFormat.toPattern();
        assertEquals("mi6U|S0<6R", pattern);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateExtendedMessageFormatTaking2ArgumentsThrowsIllegalArgumentException0() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = null;
        try {
          extendedMessageFormat = new ExtendedMessageFormat("eQ{5 /)S+=7b(rH", arg1);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Invalid format argument index at position 3: 5 /
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateExtendedMessageFormatTaking2ArgumentsThrowsIllegalArgumentException1() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = null;
        try {
          extendedMessageFormat = new ExtendedMessageFormat("IUj/,cO&-fl.;k s0{ ", arg1);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Unterminated format element at position 18
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEquals() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("", arg1);
        ExtendedMessageFormat arg0 = new ExtendedMessageFormat("");
        boolean equals = extendedMessageFormat.equals(arg0);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTakingStringAndCallsEquals0() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("eQ{5}/)Sf7rH5");
        ExtendedMessageFormat arg0 = new ExtendedMessageFormat("eQ{5}/)Sf7rH5");
        boolean equals = extendedMessageFormat.equals(arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNull() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("");
        boolean equals = extendedMessageFormat.equals((Object) null);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTakingStringAndCallsEquals1() throws Throwable  {
        ExtendedMessageFormat arg0 = new ExtendedMessageFormat("eQ{5}/)f7rH5");
        boolean equals = arg0.equals(arg0);
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTakingStringAndEqualsAndEqualsReturningFalse() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("");
        boolean equals = extendedMessageFormat.equals("");
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTaking2ArgumentsAndCallsApplyPattern0() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("eQ{5}/)Sf7rH5", arg1);
        extendedMessageFormat.applyPattern("eQ{5}/)Sf7rH5");
        assertEquals("eQ{5}/)Sf7rH5", extendedMessageFormat.toPattern());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateExtendedMessageFormatTaking2ArgumentsThrowsIllegalArgumentException2() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = null;
        try {
          extendedMessageFormat = new ExtendedMessageFormat("DQ/!u5+cyGZqL\"{,", arg1);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Invalid format argument index at position 15: ,
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesExtendedMessageFormatTaking2ArgumentsAndCallsApplyPattern1() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("k|0}.@'kH9E:Wm", arg1);
        extendedMessageFormat.applyPattern("k|0}.@'kH9E:Wm");
        assertEquals("k|0}.@kH9E:Wm", extendedMessageFormat.toPattern());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetFormatByArgumentIndexThrowsUnsupportedOperationException() throws Throwable  {
        ExtendedMessageFormat arg1 = new ExtendedMessageFormat("FFE");
        // Undeclared exception!
        try { 
          arg1.setFormatByArgumentIndex(44, arg1);
          fail("Expecting exception: UnsupportedOperationException");
        
        } catch(UnsupportedOperationException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("");
        extendedMessageFormat.hashCode();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetFormatsThrowsUnsupportedOperationException() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("5");
        Format[] arg0 = new Format[0];
        // Undeclared exception!
        try { 
          extendedMessageFormat.setFormats(arg0);
          fail("Expecting exception: UnsupportedOperationException");
        
        } catch(UnsupportedOperationException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetFormatsByArgumentIndexThrowsUnsupportedOperationException() throws Throwable  {
        HashMap<String, FormatFactory> arg1 = new HashMap<String, FormatFactory>();
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("+u<", arg1);
        Format[] arg0 = new Format[8];
        // Undeclared exception!
        try { 
          extendedMessageFormat.setFormatsByArgumentIndex(arg0);
          fail("Expecting exception: UnsupportedOperationException");
        
        } catch(UnsupportedOperationException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetFormatThrowsUnsupportedOperationException() throws Throwable  {
        ExtendedMessageFormat arg1 = new ExtendedMessageFormat("eQ{5}/)f7rH5");
        // Undeclared exception!
        try { 
          arg1.setFormat(39, arg1);
          fail("Expecting exception: UnsupportedOperationException");
        
        } catch(UnsupportedOperationException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.apache.commons.lang3.text.ExtendedMessageFormat", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToPatternReturningEmptyString() throws Throwable  {
        ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("");
        String pattern = extendedMessageFormat.toPattern();
        assertEquals("", pattern);
    }
  }
  