content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 09:58:30 GMT 2024
   */
  
  package org.joda.time.chrono;
  
  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 org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.joda.time.Chronology;
  import org.joda.time.DateTime;
  import org.joda.time.DateTimeZone;
  import org.joda.time.LocalDate;
  import org.joda.time.Period;
  import org.joda.time.ReadableDateTime;
  import org.joda.time.ReadablePeriod;
  import org.joda.time.chrono.CopticChronology;
  import org.joda.time.chrono.ISOChronology;
  import org.joda.time.chrono.LimitChronology;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class LimitChronology_Original_ESTest extends LimitChronology_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCheckLimits() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        instance.checkLimits(1L, "Types array must not contain duplicate: ");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking5ArgumentsReturningPositive() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        long dateTimeMillis = instance.getDateTimeMillis((long) 1, 1, 1, 1, 1);
        assertEquals(3661001L, dateTimeMillis);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking5ArgumentsReturningNegative() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        long dateTimeMillis = instance.getDateTimeMillis((-290L), 0, 1, 26, 26);
        assertEquals((-86313974L), dateTimeMillis);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking4ArgumentsReturningPositive() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        long dateTimeMillis = instance.getDateTimeMillis(2727, 1, 1, 4845);
        assertEquals(32841763204845L, dateTimeMillis);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking5ArgumentsThrowsIllegalArgumentException() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        DateTime arg2 = new DateTime((Chronology) arg0);
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, arg2);
        try { 
          instance.getDateTimeMillis((long) 1, 1, (-5000), 3827, 3827);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Value -5000 for minuteOfHour must be in the range [0,59]
           //
           verifyException("org.joda.time.field.FieldUtils", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLowerLimit() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        DateTime arg1 = new DateTime(1, 1, 1, 1, 1, 1, 1);
        DateTime arg2 = arg1.withMillis((-42697411200247L));
        LimitChronology instance = LimitChronology.getInstance(arg0, arg1, arg2);
        DateTime lowerLimit = instance.getLowerLimit();
        assertNotSame(lowerLimit, arg2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInstanceThrowsIllegalArgumentException() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        DateTime arg2 = DateTime.now((Chronology) arg0);
        // Undeclared exception!
        try { 
          LimitChronology.getInstance(arg0, arg2, arg2);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The lower limit must be come before than the upper limit
           //
           verifyException("org.joda.time.chrono.LimitChronology", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInstanceWithNullAndGetInstanceThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try { 
          LimitChronology.getInstance((Chronology) null, (ReadableDateTime) null, (ReadableDateTime) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Must supply a chronology
           //
           verifyException("org.joda.time.chrono.LimitChronology", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWithZone() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        LocalDate localDate = new LocalDate((long) 1, (Chronology) arg0);
        DateTime arg1 = localDate.toDateTimeAtStartOfDay((DateTimeZone) null);
        LimitChronology instance = LimitChronology.getInstance(arg0, arg1, (ReadableDateTime) null);
        Chronology withZone = instance.withZone((DateTimeZone) null);
        assertNotSame(withZone, instance);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInstanceAndToString() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstanceUTC();
        DateTime arg2 = new DateTime((Chronology) arg0);
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, arg2);
        String string = instance.toString();
        assertEquals("LimitChronology[CopticChronology[UTC], NoLimit, 1730-06-07T20:21:21.320Z]", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test() throws Throwable  {
        CopticChronology instanceUTC = CopticChronology.getInstanceUTC();
        Period period = Period.ZERO;
        Period arg0 = period.withHours(2727);
        long add = instanceUTC.add((ReadablePeriod) arg0, (-53184209313999L), 4845);
        assertEquals((-5619875313999L), add);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking7Arguments() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        long dateTimeMillis = instance.getDateTimeMillis(1, 1, 1, 1, 1, 1, 1);
        assertEquals((-53184207538999L), dateTimeMillis);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetInstanceWithNullAndToString() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        DateTime arg1 = new DateTime();
        LimitChronology instance = LimitChronology.getInstance(arg0, arg1, (ReadableDateTime) null);
        String string = instance.toString();
        assertEquals("LimitChronology[CopticChronology[Etc/UTC], 2014-02-14T20:21:21.320Z, NoLimit]", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUpperLimit() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        DateTime upperLimit = instance.getUpperLimit();
        assertNull(upperLimit);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking4ArgumentsReturningNegative() throws Throwable  {
        CopticChronology arg0 = CopticChronology.getInstance();
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, (ReadableDateTime) null);
        long dateTimeMillis = instance.getDateTimeMillis(1, 1, 1, 1);
        assertEquals((-53184211199999L), dateTimeMillis);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDateTimeMillisTaking5ArgumentsWithNegative() throws Throwable  {
        ISOChronology arg0 = ISOChronology.getInstance((DateTimeZone) null);
        DateTime arg2 = new DateTime((DateTimeZone) null);
        LimitChronology instance = LimitChronology.getInstance(arg0, (ReadableDateTime) null, arg2);
        try { 
          instance.getDateTimeMillis(9223372036854775807L, 2147482509, (-6), 2147483051, (-6));
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // The instant is above the supported maximum of 2014-02-14T20:21:21.320Z (ISOChronology[Etc/UTC])
           //
           verifyException("org.joda.time.chrono.LimitChronology", e);
        }
    }
  }
  