MersennePrimeFieldElement implements FieldElement { private FieldElement create(BigInteger value) { return new MersennePrimeFieldElement(value, modulus); } private  MersennePrimeFieldElement(BigInteger value, MersennePrimeModulus modulus); @Override FieldElement add(FieldElement operand); @Override FieldElement subtract(FieldElement operand); @Override FieldElement negate(); @Override FieldElement multiply(FieldElement operand); @Override FieldElement sqrt(); @Override FieldElement modInverse(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void nullModulus() { BigIntegerFieldElement.create(BigInteger.ZERO, null); }
@Test(expected = NullPointerException.class) public void nullValue() { BigIntegerFieldElement.create(BigInteger.ZERO, null); }