content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Tue Mar 19 14:38:51 GMT 2024
   */
  
  package com.google.common.math;
  
  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 com.google.common.math.BigIntegerMath;
  import java.math.BigInteger;
  import java.math.RoundingMode;
  import java.util.LinkedList;
  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 BigIntegerMath_Original_ESTest extends BigIntegerMath_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testListProductTakingListReturningBigIntegerWhereByteValueIsPositive() throws Throwable  {
        LinkedList<BigInteger> arg0 = new LinkedList<BigInteger>();
        BigInteger listProduct = BigIntegerMath.listProduct(arg0);
        assertEquals((byte)1, listProduct.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFitsInLongReturningTrue() throws Throwable  {
        BigInteger arg0 = BigInteger.ZERO;
        boolean fitsInLong = BigIntegerMath.fitsInLong(arg0);
        assertTrue(fitsInLong);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFitsInLongReturningFalse() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        boolean fitsInLong = BigIntegerMath.fitsInLong(arg0);
        assertFalse(fitsInLong);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialReturningBigIntegerWhereByteValueIsNegative() throws Throwable  {
        BigInteger factorial = BigIntegerMath.factorial(8);
        assertEquals((short) (-25216), factorial.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialReturningBigIntegerWhereByteValueIsPositive() throws Throwable  {
        BigInteger factorial = BigIntegerMath.factorial(1);
        assertEquals((byte)1, factorial.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDivideReturningBigIntegerWhereByteValueIsZero() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial(2205);
        BigInteger bigInteger = BigInteger.ZERO;
        BigInteger arg1 = bigInteger.flipBit(1295);
        RoundingMode arg2 = RoundingMode.HALF_EVEN;
        BigInteger divide = BigIntegerMath.divide(arg0, arg1, arg2);
        assertNotSame(divide, bigInteger);
        assertEquals((byte)0, divide.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBinomialReturningBigIntegerWhereByteValueIsZero() throws Throwable  {
        BigInteger binomial = BigIntegerMath.binomial(256, 21);
        assertEquals((short)3328, binomial.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorial0() throws Throwable  {
        BigInteger factorial = BigIntegerMath.factorial(47);
        assertEquals((short)0, factorial.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBinomial() throws Throwable  {
        BigInteger binomial = BigIntegerMath.binomial(4265, 47);
        assertEquals((short)25408, binomial.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBinomialAndLog2() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.binomial(1181, 1181);
        RoundingMode arg1 = RoundingMode.FLOOR;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(0, log2);
        assertEquals((short)1, arg0.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBinomialReturningBigIntegerWhereByteValueIsNegative() throws Throwable  {
        BigInteger binomial = BigIntegerMath.binomial(1982292598, 3);
        assertEquals((byte) (-92), binomial.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBinomialThrowsIllegalArgumentException() throws Throwable  {
        // Undeclared exception!
        try { 
          BigIntegerMath.binomial(5, 276);
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // k (276) > n (5)
           //
           verifyException("com.google.common.base.Preconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testListProductTakingListReturningNull() throws Throwable  {
        LinkedList<BigInteger> arg0 = new LinkedList<BigInteger>();
        arg0.add((BigInteger) null);
        BigInteger listProduct = BigIntegerMath.listProduct(arg0);
        assertNull(listProduct);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testListProductTaking3Arguments() throws Throwable  {
        LinkedList<BigInteger> arg0 = new LinkedList<BigInteger>();
        BigInteger listProduct = BigIntegerMath.listProduct(arg0, 1686, 1686);
        assertEquals((short)1, listProduct.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrtReturningBigIntegerWhereByteValueIsPositive() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial((byte)34);
        RoundingMode arg1 = RoundingMode.HALF_EVEN;
        BigInteger sqrt = BigIntegerMath.sqrt(arg0, arg1);
        assertEquals((byte)54, sqrt.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrt0() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.HALF_UP;
        BigInteger sqrt = BigIntegerMath.sqrt(arg0, arg1);
        assertEquals((short) (-4627), sqrt.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrtWithBigIntegerWhereByteValueIsZeroAndBigIntegerWhereShortValueIsZero() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial(2922);
        RoundingMode arg1 = RoundingMode.CEILING;
        BigInteger sqrt = BigIntegerMath.sqrt(arg0, arg1);
        assertEquals((byte) (-75), sqrt.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDivideReturningBigIntegerWhereByteValueIsNegative() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg2 = RoundingMode.FLOOR;
        BigInteger arg1 = BigIntegerMath.sqrt(arg0, arg2);
        BigInteger divide = BigIntegerMath.divide(arg0, arg1, arg2);
        assertEquals((byte) (-19), divide.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrtThrowsArithmeticException() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.UNNECESSARY;
        // Undeclared exception!
        try { 
          BigIntegerMath.sqrt(arg0, arg1);
          fail("Expecting exception: ArithmeticException");
        
        } catch(ArithmeticException e) {
           //
           // mode was UNNECESSARY, but rounding was necessary
           //
           verifyException("com.google.common.math.MathPreconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrtReturningBigIntegerWhereByteValueIsZero() throws Throwable  {
        BigInteger arg0 = BigInteger.ZERO;
        RoundingMode arg1 = RoundingMode.UP;
        BigInteger sqrt = BigIntegerMath.sqrt(arg0, arg1);
        assertSame(sqrt, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialAndLog100() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial(2205);
        RoundingMode arg1 = RoundingMode.HALF_EVEN;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(6417, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog100() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.HALF_EVEN;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(77, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog101() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.HALF_UP;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(77, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog102() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.HALF_DOWN;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(77, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog103() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.FLOOR;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(77, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog104() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.DOWN;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(77, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog10ThrowsArithmeticException() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial(77);
        RoundingMode arg1 = RoundingMode.UNNECESSARY;
        // Undeclared exception!
        try { 
          BigIntegerMath.log10(arg0, arg1);
          fail("Expecting exception: ArithmeticException");
        
        } catch(ArithmeticException e) {
           //
           // mode was UNNECESSARY, but rounding was necessary
           //
           verifyException("com.google.common.math.MathPreconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialAndLog101() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial((byte)94);
        RoundingMode arg1 = RoundingMode.UP;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(147, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog10ReturningZero() throws Throwable  {
        BigInteger arg0 = BigInteger.ONE;
        RoundingMode arg1 = RoundingMode.HALF_EVEN;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(0, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog105() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.CEILING;
        int log10 = BigIntegerMath.log10(arg0, arg1);
        assertEquals(78, log10);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialAndLog20() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial((byte)34);
        RoundingMode arg1 = RoundingMode.HALF_DOWN;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(128, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog20() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.HALF_EVEN;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(256, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorialAndLog21() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.factorial(2205);
        RoundingMode arg1 = RoundingMode.HALF_UP;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(21316, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog21() throws Throwable  {
        BigInteger arg0 = BigInteger.TEN;
        RoundingMode arg1 = RoundingMode.HALF_DOWN;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(3, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog2AndLog2ReturningZero() throws Throwable  {
        BigInteger arg0 = BigInteger.ONE;
        RoundingMode arg1 = RoundingMode.CEILING;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(0, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog22() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.UP;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(257, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog23() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.DOWN;
        int log2 = BigIntegerMath.log2(arg0, arg1);
        assertEquals(256, log2);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLog2ThrowsArithmeticException() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.UNNECESSARY;
        // Undeclared exception!
        try { 
          BigIntegerMath.log2(arg0, arg1);
          fail("Expecting exception: ArithmeticException");
        
        } catch(ArithmeticException e) {
           //
           // mode was UNNECESSARY, but rounding was necessary
           //
           verifyException("com.google.common.math.MathPreconditions", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPowerOfTwoReturningFalse() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        boolean powerOfTwo = BigIntegerMath.isPowerOfTwo(arg0);
        assertFalse(powerOfTwo);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsPowerOfTwoReturningTrue() throws Throwable  {
        BigInteger arg0 = BigInteger.ONE;
        boolean powerOfTwo = BigIntegerMath.isPowerOfTwo(arg0);
        assertTrue(powerOfTwo);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDivideReturningBigIntegerWhereByteValueIsPositive() throws Throwable  {
        BigInteger arg1 = BigIntegerMath.factorial(2205);
        RoundingMode arg2 = RoundingMode.HALF_EVEN;
        BigInteger divide = BigIntegerMath.divide(arg1, arg1, arg2);
        assertEquals((short)1, divide.shortValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSqrt1() throws Throwable  {
        BigInteger arg0 = BigIntegerMath.SQRT2_PRECOMPUTED_BITS;
        RoundingMode arg1 = RoundingMode.DOWN;
        BigInteger sqrt = BigIntegerMath.sqrt(arg0, arg1);
        assertEquals((byte) (-20), sqrt.byteValue());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFactorial1() throws Throwable  {
        BigInteger factorial = BigIntegerMath.factorial(128);
        assertEquals((byte)0, factorial.byteValue());
    }
  }
  