assertTrue("inverse less than zero: " + a + " inv mod "
+ mod + " equals " + inv, inv
.compareTo(BigInteger.ZERO) >= 0);
} catch (ArithmeticException e) {
assertTrue("should have found inverse for " + a + " mod "
+ mod, !one.equals(a.gcd(mod)));
}
}
}
for (int j = 1; j < 10; j++) {
mod = bi2.add(BigInteger.valueOf(j));