@Test
public void modInverse() {

  BigInteger result1 = BigIntegerFieldElement
      .extractValue(BigIntegerFieldElement.create(1, modulus).modInverse());
  BigInteger result2 = BigIntegerFieldElement
      .extractValue(BigIntegerFieldElement.create(27, modulus).modInverse());
  BigInteger result3 = BigIntegerFieldElement
      .extractValue(BigIntegerFieldElement.create(56, modulus).modInverse());
  BigInteger result4 = BigIntegerFieldElement
      .extractValue(BigIntegerFieldElement.create(77, modulus).modInverse());
  BigInteger result5 = BigIntegerFieldElement
      .extractValue(BigIntegerFieldElement.create(112, modulus).modInverse());
  assertThat(result1, Is.is(BigInteger.valueOf(1)));
  assertThat(result2, Is.is(BigInteger.valueOf(67)));
  assertThat(result3, Is.is(BigInteger.valueOf(111)));
  assertThat(result4, Is.is(BigInteger.valueOf(91)));
  assertThat(result5, Is.is(BigInteger.valueOf(112)));
}