BigInteger[] ps = {new BigInteger("-1000000000000"), BigInteger.ZERO,
BigInteger.ONE, new BigInteger("1000000000000")};
BigInteger[] gs = {new BigInteger("-1000000000000"), BigInteger.ZERO,
BigInteger.ONE, new BigInteger("1000000000000")};
for (int i=0; i<ps.length; i++) {
DHPrivateKeySpec dhpks = new DHPrivateKeySpec(xs[i], ps[i], gs[i]);
assertEquals("The value returned by getX() must be "
+ "equal to the value specified in the constructor",
dhpks.getX(), xs[i]);
assertEquals("The value returned by getP() must be "
+ "equal to the value specified in the constructor",
dhpks.getP(), ps[i]);
assertEquals("The value returned by getG() must be "
+ "equal to the value specified in the constructor",
dhpks.getG(), gs[i]);
}
}