BigIntegerFieldElement implements FieldElement { @Override public FieldElement multiply(FieldElement operand) { return create(value.multiply(extractValue(operand))); } private  BigIntegerFieldElement(BigInteger value, BigIntegerModulus 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 public void multiply() { FieldElement element1 = BigIntegerFieldElement.create(1, modulus); FieldElement element2 = BigIntegerFieldElement.create(2, modulus); FieldElement element3 = BigIntegerFieldElement.create(4, modulus); BigInteger result1 = BigIntegerFieldElement .extractValue(BigIntegerFieldElement.create(27, modulus).multiply(element1)); BigInteger result2 = BigIntegerFieldElement .extractValue(BigIntegerFieldElement.create(43, modulus).multiply(element2)); BigInteger result3 = BigIntegerFieldElement .extractValue(BigIntegerFieldElement.create(76, modulus).multiply(element3)); BigInteger result4 = BigIntegerFieldElement .extractValue(BigIntegerFieldElement.create(98, modulus).multiply(element2)); BigInteger result5 = BigIntegerFieldElement .extractValue(BigIntegerFieldElement.create(112, modulus).multiply(element3)); assertThat(result1, Is.is(BigInteger.valueOf(27))); assertThat(result2, Is.is(BigInteger.valueOf(86))); assertThat(result3, Is.is(BigInteger.valueOf(78))); assertThat(result4, Is.is(BigInteger.valueOf(83))); assertThat(result5, Is.is(BigInteger.valueOf(109))); }