content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 06:13:07 GMT 2024
   */
  
  package org.joda.time.base;
  
  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.DateTime;
  import org.joda.time.DateTimeFieldType;
  import org.joda.time.DateTimeZone;
  import org.joda.time.Days;
  import org.joda.time.DurationFieldType;
  import org.joda.time.Hours;
  import org.joda.time.LocalDate;
  import org.joda.time.LocalDateTime;
  import org.joda.time.Minutes;
  import org.joda.time.MonthDay;
  import org.joda.time.Months;
  import org.joda.time.MutableDateTime;
  import org.joda.time.Partial;
  import org.joda.time.PeriodType;
  import org.joda.time.ReadableInstant;
  import org.joda.time.ReadablePartial;
  import org.joda.time.ReadablePeriod;
  import org.joda.time.Weeks;
  import org.joda.time.YearMonth;
  import org.joda.time.Years;
  import org.joda.time.base.BaseSingleFieldPeriod;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class BaseSingleFieldPeriod_Original_ESTest extends BaseSingleFieldPeriod_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStandardPeriodInReturningPositive() throws Throwable  {
        Minutes arg0 = Minutes.THREE;
        int standardPeriodIn = BaseSingleFieldPeriod.standardPeriodIn(arg0, 3537L);
        assertEquals(50, standardPeriodIn);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningPositive() throws Throwable  {
        Minutes minutes = Minutes.MAX_VALUE;
        int value = minutes.getValue(0);
        assertEquals(Integer.MAX_VALUE, value);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningNegative() throws Throwable  {
        Minutes minutes = Minutes.MIN_VALUE;
        int value = minutes.getValue(0);
        assertEquals(Integer.MIN_VALUE, value);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPeriodType() throws Throwable  {
        Months months = Months.TEN;
        PeriodType periodType = months.getPeriodType();
        assertEquals(1, periodType.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetReturningNegative() throws Throwable  {
        Weeks weeks = Weeks.MIN_VALUE;
        DurationFieldType arg0 = DurationFieldType.weeks();
        int get = weeks.get(arg0);
        assertEquals(Integer.MIN_VALUE, get);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBetweenTaking2ReadablePartialsAnd1ReturningZero() throws Throwable  {
        Years arg2 = Years.TWO;
        DateTimeFieldType arg0 = DateTimeFieldType.era();
        Partial arg1 = new Partial(arg0, 1);
        int between = BaseSingleFieldPeriod.between(arg1, arg1, arg2);
        assertEquals(0, between);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBetweenTaking2ReadablePartialsAnd1ReturningPositive() throws Throwable  {
        Hours arg2 = Hours.TWO;
        LocalDate arg1 = new LocalDate((-1000L));
        LocalDate arg0 = arg1.plusYears((-3011));
        int between = BaseSingleFieldPeriod.between(arg0, arg1, arg2);
        assertEquals(26393880, between);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBetweenTaking2ReadableInstantsAnd1() throws Throwable  {
        Minutes minutes = Minutes.ZERO;
        DateTime arg0 = new DateTime();
        DateTime arg1 = arg0.minusDays(742);
        DurationFieldType arg2 = minutes.getFieldType();
        int between = BaseSingleFieldPeriod.between(arg0, arg1, arg2);
        assertEquals((-1068480), between);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueReturningZero() throws Throwable  {
        Hours hours = Hours.hours(0);
        int value = hours.getValue(0);
        assertEquals(0, value);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFieldTypeTakingInt() throws Throwable  {
        Months months = Months.TWO;
        DurationFieldType fieldType = months.getFieldType(0);
        assertEquals("months", fieldType.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSize() throws Throwable  {
        YearMonth arg1 = new YearMonth((DateTimeZone) null);
        Years yearsBetween = Years.yearsBetween((ReadablePartial) arg1, (ReadablePartial) arg1);
        int size = yearsBetween.size();
        assertEquals(1, size);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareToReturningNegative() throws Throwable  {
        Minutes minutes = Minutes.MIN_VALUE;
        Minutes arg0 = Minutes.ONE;
        int compareTo = minutes.compareTo((BaseSingleFieldPeriod) arg0);
        assertEquals(1, arg0.getMinutes());
        assertEquals((-1), compareTo);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareToReturningPositive() throws Throwable  {
        Minutes minutes = Minutes.TWO;
        Minutes arg0 = Minutes.MIN_VALUE;
        int compareTo = minutes.compareTo((BaseSingleFieldPeriod) arg0);
        assertEquals(1, compareTo);
        assertEquals(2, minutes.getMinutes());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareToThrowsClassCastException() throws Throwable  {
        Hours hours = Hours.THREE;
        Days arg0 = hours.toStandardDays();
        // Undeclared exception!
        try { 
          hours.compareTo((BaseSingleFieldPeriod) arg0);
          fail("Expecting exception: ClassCastException");
        
        } catch(ClassCastException e) {
           //
           // class org.joda.time.Hours cannot be compared to class org.joda.time.Days
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEquals0() throws Throwable  {
        YearMonth arg1 = new YearMonth((DateTimeZone) null);
        Years yearsBetween = Years.yearsBetween((ReadablePartial) arg1, (ReadablePartial) arg1);
        Months arg0 = Months.ELEVEN;
        boolean equals = yearsBetween.equals(arg0);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNonNull() throws Throwable  {
        YearMonth arg1 = new YearMonth((DateTimeZone) null);
        Years yearsBetween = Years.yearsBetween((ReadablePartial) arg1, (ReadablePartial) arg1);
        Object arg0 = new Object();
        boolean equals = yearsBetween.equals(arg0);
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEquals1() throws Throwable  {
        Years arg0 = Years.THREE;
        Years years = Years.ZERO;
        boolean equals = years.equals(arg0);
        assertFalse(arg0.equals((Object)years));
        assertFalse(equals);
        assertEquals(3, arg0.getYears());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsSupportedReturningTrue() throws Throwable  {
        Minutes minutes = Minutes.MIN_VALUE;
        DurationFieldType arg0 = minutes.getFieldType();
        boolean supported = minutes.isSupported(arg0);
        assertTrue(supported);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsSupportedReturningFalse() throws Throwable  {
        Minutes minutes = Minutes.MIN_VALUE;
        DurationFieldType arg0 = DurationFieldType.millis();
        boolean supported = minutes.isSupported(arg0);
        assertFalse(supported);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetReturningPositive() throws Throwable  {
        Hours hours = Hours.ONE;
        DurationFieldType arg0 = hours.getFieldType();
        int get = hours.get(arg0);
        assertEquals(1, get);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetReturningZero() throws Throwable  {
        Minutes minutes = Minutes.ZERO;
        DurationFieldType arg0 = DurationFieldType.hours();
        int get = minutes.get(arg0);
        assertEquals(0, get);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetValueThrowsIndexOutOfBoundsException() throws Throwable  {
        Minutes minutes = Minutes.ONE;
        // Undeclared exception!
        try { 
          minutes.getValue(15);
          fail("Expecting exception: IndexOutOfBoundsException");
        
        } catch(IndexOutOfBoundsException e) {
           //
           // 15
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFieldTypeTakingIntThrowsIndexOutOfBoundsException() throws Throwable  {
        Months months = Months.SEVEN;
        // Undeclared exception!
        try { 
          months.getFieldType((-1));
          fail("Expecting exception: IndexOutOfBoundsException");
        
        } catch(IndexOutOfBoundsException e) {
           //
           // -1
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test0() throws Throwable  {
        Months arg0 = Months.ONE;
        // Undeclared exception!
        try { 
          Minutes.standardMinutesIn(arg0);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // Cannot convert period to duration as months is not precise in the period P1M
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test1() throws Throwable  {
        Minutes standardMinutesIn = Minutes.standardMinutesIn((ReadablePeriod) null);
        assertEquals(0, standardMinutesIn.getMinutes());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test2() throws Throwable  {
        YearMonth arg0 = new YearMonth();
        MonthDay arg1 = new MonthDay(0L);
        // Undeclared exception!
        try { 
          Minutes.minutesBetween((ReadablePartial) arg0, (ReadablePartial) arg1);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadablePartial objects must have the same set of fields
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test3() throws Throwable  {
        YearMonth arg0 = new YearMonth();
        LocalDateTime arg1 = new LocalDateTime(375L);
        // Undeclared exception!
        try { 
          Minutes.minutesBetween((ReadablePartial) arg0, (ReadablePartial) arg1);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadablePartial objects must have the same set of fields
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStandardPeriodInReturningZero() throws Throwable  {
        YearMonth arg1 = new YearMonth((DateTimeZone) null);
        Years arg0 = Years.yearsBetween((ReadablePartial) arg1, (ReadablePartial) arg1);
        assertEquals(0, arg0.getYears());
        
        int standardPeriodIn = BaseSingleFieldPeriod.standardPeriodIn(arg0, 1);
        assertEquals(0, standardPeriodIn);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test4() throws Throwable  {
        YearMonth arg0 = new YearMonth();
        // Undeclared exception!
        try { 
          Minutes.minutesBetween((ReadablePartial) arg0, (ReadablePartial) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadablePartial objects must not be null
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test5() throws Throwable  {
        // Undeclared exception!
        try { 
          Months.monthsBetween((ReadablePartial) null, (ReadablePartial) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadablePartial objects must not be null
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test6() throws Throwable  {
        MutableDateTime arg0 = new MutableDateTime();
        // Undeclared exception!
        try { 
          Weeks.weeksBetween((ReadableInstant) arg0, (ReadableInstant) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadableInstant objects must not be null
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void test7() throws Throwable  {
        // Undeclared exception!
        try { 
          Months.monthsBetween((ReadableInstant) null, (ReadableInstant) null);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // ReadableInstant objects must not be null
           //
           verifyException("org.joda.time.base.BaseSingleFieldPeriod", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        Years arg0 = Years.years((-3157));
        Years years = Years.years((-3157));
        boolean equals = years.equals(arg0);
        assertEquals((-3157), years.getYears());
        assertTrue(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToMutablePeriod() throws Throwable  {
        Minutes minutes = Minutes.ZERO;
        minutes.toMutablePeriod();
        assertEquals(1, minutes.size());
        assertEquals(0, minutes.getMinutes());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToPeriod() throws Throwable  {
        Minutes minutes = Minutes.MIN_VALUE;
        minutes.toPeriod();
        assertEquals(Integer.MIN_VALUE, minutes.getMinutes());
        assertEquals(1, minutes.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testStandardPeriodInReturningNegative() throws Throwable  {
        Days arg0 = Days.FOUR;
        int standardPeriodIn = BaseSingleFieldPeriod.standardPeriodIn(arg0, (-1989L));
        assertEquals((-173755), standardPeriodIn);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        Minutes minutes = Minutes.THREE;
        minutes.hashCode();
        assertEquals(3, minutes.getMinutes());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCompareToReturningZero() throws Throwable  {
        Minutes arg0 = Minutes.TWO;
        int compareTo = arg0.compareTo((BaseSingleFieldPeriod) arg0);
        assertEquals(2, arg0.getMinutes());
        assertEquals(0, compareTo);
    }
  }
  