/*
 * This file was automatically generated by EvoSuite
 * Mon Feb 24 16:54:27 GMT 2020
 */

package org.joda.time.format;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.joda.time.Chronology;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.DurationField;
import org.joda.time.DurationFieldType;
import org.joda.time.chrono.BuddhistChronology;
import org.joda.time.chrono.CopticChronology;
import org.joda.time.chrono.EthiopicChronology;
import org.joda.time.chrono.GJChronology;
import org.joda.time.chrono.GregorianChronology;
import org.joda.time.chrono.ISOChronology;
import org.joda.time.chrono.IslamicChronology;
import org.joda.time.chrono.JulianChronology;
import org.joda.time.chrono.LenientChronology;
import org.joda.time.chrono.StrictChronology;
import org.joda.time.field.LenientDateTimeField;
import org.joda.time.field.MillisDurationField;
import org.joda.time.field.SkipDateTimeField;
import org.joda.time.field.UnsupportedDurationField;
import org.joda.time.format.DateTimeParserBucket;
import org.joda.time.tz.FixedDateTimeZone;

public class DateTimeParserBucket_ESTest_EvoSuite extends DateTimeParserBucket_ESTest_scaffolding_EvoSuite {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeField dateTimeField0 = buddhistChronology0.monthOfYear();
      SkipDateTimeField skipDateTimeField0 = new SkipDateTimeField((Chronology) null, dateTimeField0, 0);
      DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField0 = new DateTimeParserBucket.SavedField(skipDateTimeField0, 0);
      DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField1 = new DateTimeParserBucket.SavedField(dateTimeField0, 1);
      int int0 = dateTimeParserBucket_SavedField0.compareTo(dateTimeParserBucket_SavedField1);
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance(dateTimeZone0, 1);
      DateTimeField dateTimeField0 = buddhistChronology0.monthOfYear();
      DateTimeField dateTimeField1 = LenientDateTimeField.getInstance(dateTimeField0, gregorianChronology0);
      DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField0 = new DateTimeParserBucket.SavedField(dateTimeField1, 0);
      long long0 = dateTimeParserBucket_SavedField0.set(0L, false);
      assertEquals((-2678400000L), long0);
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      ISOChronology iSOChronology0 = ISOChronology.getInstanceUTC();
      Locale locale0 = new Locale("");
      Integer integer0 = new Integer((-1184));
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-272L), iSOChronology0, locale0, integer0);
      dateTimeParserBucket0.setZone((DateTimeZone) null);
      DateTimeZone dateTimeZone0 = dateTimeParserBucket0.getZone();
      assertNull(dateTimeZone0);
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      Locale locale0 = new Locale("org.joda.time.field.ScaledDurationField", "org.joda.time.field.ScaledDurationField", "org.joda.time.format.DateTimeParserBucket$SavedState");
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(2452L, (Chronology) null, locale0);
      Integer integer0 = dateTimeParserBucket0.getPivotYear();
      assertNull(integer0);
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      FixedDateTimeZone fixedDateTimeZone0 = (FixedDateTimeZone)DateTimeZone.UTC;
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance((DateTimeZone) fixedDateTimeZone0);
      StrictChronology strictChronology0 = StrictChronology.getInstance(gregorianChronology0);
      LenientChronology lenientChronology0 = LenientChronology.getInstance(strictChronology0);
      Integer integer0 = new Integer(0);
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(10000000L, lenientChronology0, (Locale) null, integer0);
      Integer integer1 = dateTimeParserBucket0.getPivotYear();
      assertEquals(0, (int)integer1);
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      Locale locale0 = new Locale("", "", "(#B_S$f$7RE!!f5");
      Integer integer0 = new Integer((-2827));
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(2716L, (Chronology) null, locale0, integer0);
      Integer integer1 = dateTimeParserBucket0.getPivotYear();
      assertEquals((-2827), (int)integer1);
  }

  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      JulianChronology julianChronology0 = JulianChronology.getInstanceUTC();
      LenientChronology lenientChronology0 = LenientChronology.getInstance(julianChronology0);
      Locale locale0 = Locale.TAIWAN;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-1L), lenientChronology0, locale0);
      dateTimeParserBucket0.setOffset(0);
      Integer integer0 = dateTimeParserBucket0.getOffsetInteger();
      assertEquals(0, (int)integer0);
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      GJChronology gJChronology0 = GJChronology.getInstanceUTC();
      Locale locale0 = Locale.TRADITIONAL_CHINESE;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(30962844000000L, gJChronology0, locale0);
      dateTimeParserBucket0.setOffset((-3));
      dateTimeParserBucket0.getOffsetInteger();
      assertEquals((-3), dateTimeParserBucket0.getOffset());
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      IslamicChronology islamicChronology0 = IslamicChronology.getInstance();
      Locale locale0 = new Locale("", "org.joda.time.DateTimeUtils", "W>bCCt)C-l$N]@0\u0007");
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0, islamicChronology0, locale0);
      dateTimeParserBucket0.setOffset((Integer) islamicChronology0.AH);
      int int0 = dateTimeParserBucket0.getOffset();
      assertEquals(1, int0);
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      GJChronology gJChronology0 = GJChronology.getInstanceUTC();
      Locale locale0 = Locale.TRADITIONAL_CHINESE;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(30962844000000L, gJChronology0, locale0);
      dateTimeParserBucket0.setOffset((-3));
      int int0 = dateTimeParserBucket0.getOffset();
      assertEquals((-3), int0);
  }

  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GJChronology gJChronology0 = GJChronology.getInstance(dateTimeZone0, 3796L, 1);
      Locale locale0 = Locale.SIMPLIFIED_CHINESE;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(1L, gJChronology0, locale0, (Integer) 1);
      dateTimeParserBucket0.setOffset(1);
      long long0 = dateTimeParserBucket0.computeMillis(true, "=%E>bys?htc<H");
      assertEquals(1, dateTimeParserBucket0.getOffset());
      assertEquals(0L, long0);
  }

  @Test(timeout = 4000)
  public void test13()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.TAIWAN;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, buddhistChronology0, locale0);
      long long0 = dateTimeParserBucket0.computeMillis(true);
      assertEquals(0L, long0);
  }

  @Test(timeout = 4000)
  public void test14()  throws Throwable  {
      IslamicChronology islamicChronology0 = IslamicChronology.getInstanceUTC();
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-3093L), islamicChronology0, locale0, (Integer) 1, 1);
      long long0 = dateTimeParserBucket0.computeMillis(false);
      assertEquals((-3093L), long0);
  }

  @Test(timeout = 4000)
  public void test15()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.TAIWAN;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, buddhistChronology0, locale0);
      DateTimeField dateTimeField0 = buddhistChronology0.hourOfDay();
      dateTimeParserBucket0.saveField(dateTimeField0, 1);
      long long0 = dateTimeParserBucket0.computeMillis();
      assertEquals(3600000L, long0);
  }

  @Test(timeout = 4000)
  public void test16()  throws Throwable  {
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-1319L), (Chronology) null, locale0);
      long long0 = dateTimeParserBucket0.computeMillis();
      assertEquals((-1319L), long0);
  }

  @Test(timeout = 4000)
  public void test17()  throws Throwable  {
      MillisDurationField millisDurationField0 = (MillisDurationField)MillisDurationField.INSTANCE;
      int int0 = DateTimeParserBucket.compareReverse((DurationField) null, millisDurationField0);
      assertEquals((-1), int0);
  }

  @Test(timeout = 4000)
  public void test23()  throws Throwable  {
      DateTimeZone dateTimeZone0 = DateTimeZone.getDefault();
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(dateTimeZone0);
      Locale locale0 = Locale.ITALY;
      DateTimeField dateTimeField0 = buddhistChronology0.hourOfHalfday();
      DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField0 = new DateTimeParserBucket.SavedField(dateTimeField0, 10);
      DateTimeField dateTimeField1 = buddhistChronology0.weekOfWeekyear();
      DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField1 = new DateTimeParserBucket.SavedField(dateTimeField1, "", locale0);
      int int0 = dateTimeParserBucket_SavedField0.compareTo(dateTimeParserBucket_SavedField1);
      assertEquals(1, int0);
  }

  @Test(timeout = 4000)
  public void test24()  throws Throwable  {
      EthiopicChronology ethiopicChronology0 = EthiopicChronology.getInstanceUTC();
      Locale locale0 = Locale.GERMANY;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, ethiopicChronology0, locale0);
      Object object0 = dateTimeParserBucket0.saveState();
      boolean boolean0 = dateTimeParserBucket0.restoreState(object0);
      assertTrue(boolean0);
  }

  @Test(timeout = 4000)
  public void test25()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.forLanguageTag("");
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(439L, buddhistChronology0, locale0);
      Object object0 = dateTimeParserBucket0.saveState();
      Object object1 = dateTimeParserBucket0.saveState();
      assertSame(object1, object0);
  }

  @Test(timeout = 4000)
  public void test26()  throws Throwable  {
      DurationFieldType durationFieldType0 = DurationFieldType.hours();
      UnsupportedDurationField unsupportedDurationField0 = UnsupportedDurationField.getInstance(durationFieldType0);
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance();
      DurationField durationField0 = buddhistChronology0.days();
      int int0 = DateTimeParserBucket.compareReverse(durationField0, unsupportedDurationField0);
      assertEquals(1, int0);
  }

  @Test(timeout = 4000)
  public void test27()  throws Throwable  {
      int int0 = DateTimeParserBucket.compareReverse((DurationField) null, (DurationField) null);
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test28()  throws Throwable  {
      DurationFieldType durationFieldType0 = DurationFieldType.hours();
      UnsupportedDurationField unsupportedDurationField0 = UnsupportedDurationField.getInstance(durationFieldType0);
      int int0 = DateTimeParserBucket.compareReverse(unsupportedDurationField0, unsupportedDurationField0);
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test30()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.KOREA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, buddhistChronology0, locale0, (Integer) 1);
      DateTimeField dateTimeField0 = buddhistChronology0.monthOfYear();
      dateTimeParserBucket0.saveField(dateTimeField0, 1);
      dateTimeParserBucket0.computeMillis(true, "Fk3s4j$u_PeT5");
      long long0 = dateTimeParserBucket0.computeMillis(true, "lL0_&^_D^ev");
      assertEquals((-16187904000000L), long0);
  }

  @Test(timeout = 4000)
  public void test31()  throws Throwable  {
      ISOChronology iSOChronology0 = ISOChronology.getInstanceUTC();
      Locale locale0 = new Locale("");
      Integer integer0 = new Integer((-1184));
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-272L), iSOChronology0, locale0, integer0);
      dateTimeParserBucket0.setZone((DateTimeZone) null);
      long long0 = dateTimeParserBucket0.computeMillis(false, "");
      assertEquals((-272L), long0);
  }

  @Test(timeout = 4000)
  public void test32()  throws Throwable  {
      GJChronology gJChronology0 = GJChronology.getInstanceUTC();
      Locale locale0 = Locale.TRADITIONAL_CHINESE;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(30962844000000L, gJChronology0, locale0);
      dateTimeParserBucket0.setOffset((-3));
      long long0 = dateTimeParserBucket0.computeMillis(false, "chinois (Taiwan)");
      assertEquals((-3), dateTimeParserBucket0.getOffset());
      assertEquals(30962844000003L, long0);
  }

  @Test(timeout = 4000)
  public void test34()  throws Throwable  {
      DateTimeZone dateTimeZone0 = DateTimeZone.forOffsetMillis(848);
      IslamicChronology.LeapYearPatternType islamicChronology_LeapYearPatternType0 = IslamicChronology.LEAP_YEAR_INDIAN;
      IslamicChronology islamicChronology0 = IslamicChronology.getInstance(dateTimeZone0, islamicChronology_LeapYearPatternType0);
      Locale locale0 = Locale.FRENCH;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-1849L), islamicChronology0, locale0, (Integer) 1, 1);
      DateTimeParserBucket.SavedState dateTimeParserBucket_SavedState0 = dateTimeParserBucket0.new SavedState();
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance();
      DateTimeField dateTimeField0 = buddhistChronology0.dayOfMonth();
      dateTimeParserBucket0.saveField(dateTimeField0, (-1326));
      boolean boolean0 = dateTimeParserBucket_SavedState0.restoreState(dateTimeParserBucket0);
      assertTrue(boolean0);
      
      long long0 = dateTimeParserBucket0.computeMillis(false, "=?BhQ=ZB^");
      assertEquals((-2697L), long0);
  }

  @Test(timeout = 4000)
  public void test35()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.forLanguageTag("");
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(439L, buddhistChronology0, locale0);
      DateTimeParserBucket dateTimeParserBucket1 = new DateTimeParserBucket(0L, buddhistChronology0, locale0, (Integer) buddhistChronology0.BE);
      Object object0 = dateTimeParserBucket0.saveState();
      assertNotNull(object0);
      
      boolean boolean0 = dateTimeParserBucket1.restoreState(object0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test36()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance(dateTimeZone0, 1);
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, gregorianChronology0, locale0, (Integer) 1, 1);
      boolean boolean0 = dateTimeParserBucket0.restoreState(dateTimeZone0);
      assertFalse(boolean0);
  }

  @Test(timeout = 4000)
  public void test37()  throws Throwable  {
      DateTimeZone dateTimeZone0 = DateTimeZone.getDefault();
      JulianChronology julianChronology0 = JulianChronology.getInstance(dateTimeZone0);
      Locale locale0 = Locale.PRC;
      Integer integer0 = new Integer(4278);
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-2506L), julianChronology0, locale0, integer0, 4278);
      dateTimeParserBucket0.setOffset(0);
      int int0 = dateTimeParserBucket0.getOffset();
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test38()  throws Throwable  {
      DateTimeZone dateTimeZone0 = DateTimeZone.getDefault();
      JulianChronology julianChronology0 = JulianChronology.getInstance(dateTimeZone0);
      Locale locale0 = Locale.PRC;
      Integer integer0 = new Integer(4278);
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-2506L), julianChronology0, locale0, integer0, 4278);
      int int0 = dateTimeParserBucket0.getOffset();
      assertEquals(0, int0);
  }

  @Test(timeout = 4000)
  public void test39()  throws Throwable  {
      GJChronology gJChronology0 = GJChronology.getInstanceUTC();
      Locale locale0 = Locale.TRADITIONAL_CHINESE;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(30962844000000L, gJChronology0, locale0);
      dateTimeParserBucket0.setPivotYear((Integer) null);
      assertNull(dateTimeParserBucket0.getPivotYear());
  }

  @Test(timeout = 4000)
  public void test40()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance(dateTimeZone0, 1);
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, gregorianChronology0, locale0, (Integer) 1, 1);
      Integer integer0 = dateTimeParserBucket0.getOffsetInteger();
      assertNull(integer0);
  }

  @Test(timeout = 4000)
  public void test41()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      Locale locale0 = Locale.KOREA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-1L), buddhistChronology0, locale0, (Integer) 1);
      Locale locale1 = dateTimeParserBucket0.getLocale();
      assertEquals("ko", locale1.getLanguage());
  }

  @Test(timeout = 4000)
  public void test42()  throws Throwable  {
      IslamicChronology islamicChronology0 = IslamicChronology.getInstanceUTC();
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket((-3500L), islamicChronology0, (Locale) null);
      dateTimeParserBucket0.setOffset(1);
      dateTimeParserBucket0.getOffsetInteger();
      assertEquals(1, dateTimeParserBucket0.getOffset());
  }

  @Test(timeout = 4000)
  public void test43()  throws Throwable  {
      DateTimeZone dateTimeZone0 = DateTimeZone.getDefault();
      CopticChronology copticChronology0 = CopticChronology.getInstance(dateTimeZone0);
      Locale locale0 = Locale.KOREAN;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, copticChronology0, locale0, (Integer) 1, 1);
      long long0 = dateTimeParserBucket0.computeMillis();
      assertEquals(0L, long0);
  }

  @Test(timeout = 4000)
  public void test44()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance();
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(751L, buddhistChronology0, (Locale) null, (Integer) 1);
      Integer integer0 = dateTimeParserBucket0.getPivotYear();
      assertEquals(1, (int)integer0);
  }

  @Test(timeout = 4000)
  public void test45()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance();
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(751L, buddhistChronology0, (Locale) null, (Integer) 1);
      long long0 = dateTimeParserBucket0.computeMillis(true);
      assertEquals(751L, long0);
  }

  @Test(timeout = 4000)
  public void test46()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance(dateTimeZone0, 1);
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, gregorianChronology0, locale0, (Integer) 1, 1);
      Chronology chronology0 = dateTimeParserBucket0.getChronology();
      assertNotSame(gregorianChronology0, chronology0);
  }

  @Test(timeout = 4000)
  public void test47()  throws Throwable  {
      BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstanceUTC();
      DateTimeZone dateTimeZone0 = buddhistChronology0.getZone();
      GregorianChronology gregorianChronology0 = GregorianChronology.getInstance(dateTimeZone0, 1);
      Locale locale0 = Locale.CHINA;
      DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0L, gregorianChronology0, locale0, (Integer) 1, 1);
      DateTimeZone dateTimeZone1 = dateTimeParserBucket0.getZone();
      assertSame(dateTimeZone1, dateTimeZone0);
  }
}
