@Test
public void testAdd() {

  assertEquals(
      BigInteger.ZERO,
      new CompUInt128(0).add(new CompUInt128(0)).toBigInteger()
  );
  assertEquals(
      two,
      new CompUInt128(1).add(new CompUInt128(1)).toBigInteger()
  );
  assertEquals(
      twoTo32,
      new CompUInt128(twoTo32).add(new CompUInt128(0)).toBigInteger()
  );
  assertEquals(
      twoTo32.add(BigInteger.ONE),
      new CompUInt128(twoTo32).add(new CompUInt128(1)).toBigInteger()
  );
  assertEquals(
      twoTo64,
      new CompUInt128(twoTo64).add(new CompUInt128(0)).toBigInteger()
  );
  assertEquals(
      twoTo64.add(BigInteger.ONE),
      new CompUInt128(twoTo64).add(new CompUInt128(1)).toBigInteger()
  );
  assertEquals(
      twoTo128.subtract(BigInteger.ONE),
      new CompUInt128(twoTo128.subtract(BigInteger.ONE)).add(new CompUInt128(0))
          .toBigInteger()
  );
  assertEquals(
      BigInteger.ZERO,
      new CompUInt128(twoTo128.subtract(BigInteger.ONE))
          .add(new CompUInt128(BigInteger.ONE)).toBigInteger()
  );
  assertEquals(
      twoTo128.subtract(new BigInteger("10000000")).add(twoTo32.add(twoTo64)).mod(twoTo128),
      new CompUInt128(twoTo128.subtract(new BigInteger("10000000")))
          .add(new CompUInt128(twoTo32.add(twoTo64))).toBigInteger()
  );
  assertEquals(
      twoTo32.add(twoTo64).mod(twoTo128),
      new CompUInt128(twoTo32).add(new CompUInt128(twoTo64)).toBigInteger()
  );
}