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