### Question:
Gmp { public static BigInteger gcd(BigInteger value1, BigInteger value2) { return INSTANCE.get().gcdImpl(value1, value2); } private  Gmp(); static void checkLoaded(); static int kronecker(BigInteger a, BigInteger p); static BigInteger modPowInsecure(BigInteger base, BigInteger exponent,
      BigInteger modulus); static BigInteger modInverse(BigInteger val, BigInteger modulus); static BigInteger exactDivide(BigInteger dividend, BigInteger divisor); static BigInteger gcd(BigInteger value1, BigInteger value2);  }### Answer:
@Test public void testGcd() { assertEquals(BigInteger.valueOf(11), gcd(BigInteger.valueOf(99), BigInteger.valueOf(88))); assertEquals(BigInteger.valueOf(4), gcd(BigInteger.valueOf(100), BigInteger.valueOf(88))); assertEquals(BigInteger.valueOf(1), gcd(BigInteger.valueOf(101), BigInteger.valueOf(88))); Random rnd = new Random(); for (int i = 0; i < 100; i++) { BigInteger a = new BigInteger(1024, rnd); BigInteger b = new BigInteger(1024, rnd); assertEquals(a.gcd(b), gcd(a, b)); } }
@Test public void testGcdSmallExhaustive() { for (int a = 10; a >= -10; --a) { for (int b = 10; b >= -10; --b) { BigInteger aVal = BigInteger.valueOf(a); BigInteger bVal = BigInteger.valueOf(b); BigInteger expected = aVal.gcd(bVal); BigInteger actual = gcd(aVal, bVal); assertEquals(String.format("a %d, b %d", a, b) + b, expected, actual); } } }