Java source code is available for download, so you can look at it yourself. Here is the code for BigInteger.probablePrime(int, Random) :
public static BigInteger probablePrime(int bitLength, Random rnd) { if (bitLength < 2) throw new ArithmeticException("bitLength < 2");
Actual tests are contained in the smallPrime() and largePrime() methods, which follow directly in the source code.
source share