@Test
public void testMax() throws Exception {

  BigInteger one = BigInteger.ONE;
  BigInteger ten = BigInteger.TEN;
  assertEquals(ten, SegmentGenerator.max(one, ten));
  assertEquals(ten, SegmentGenerator.max(ten, one));
  assertEquals(one, SegmentGenerator.max(one, one));
  BigInteger minusTen = BigInteger.TEN.negate();
  assertEquals(one, SegmentGenerator.max(one, minusTen));
}