@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));
  }
}