Alignments { public static long maximumLength(final Iterable<Range<Long>> ranges) { checkNotNull(ranges); if (Iterables.isEmpty(ranges)) { return -1L; } return Ordering.natural().max(lengths(ranges)).longValue(); } private  Alignments(); static long length(final Range<Long> range); static List<Long> lengths(final Iterable<Range<Long>> ranges); static long length(final Iterable<Range<Long>> ranges); static long maximumLength(final Iterable<Range<Long>> ranges); static int count(final Iterable<Range<Long>> ranges); static List<Long> starts(final Iterable<Range<Long>> ranges); static List<Long> ends(final Iterable<Range<Long>> ranges); static List<Range<Long>> gaps(final GappedSymbolList gappedSymbols); static List<Range<Long>> matches(final AlignmentPair alignmentPair); static List<Range<Long>> mismatches(final AlignmentPair alignmentPair);  }
@Test(expected=NullPointerException.class) public void testMaximumLengthNull() { maximumLength(null); }
@Test(expected=NullPointerException.class) public void testMaximumLengthNullRange() { maximumLength(Collections.singleton((Range<Long>) null)); }
@Test(expected=IllegalArgumentException.class) public void testMaximumLengthOpenRange() { maximumLength(Collections.singleton(Range.open(2L, 4L))); }
@Test(expected=IllegalArgumentException.class) public void testMaximumLengthClosedRange() { maximumLength(Collections.singleton(Range.closed(2L, 4L))); }
@Test(expected=IllegalArgumentException.class) public void testMaximumLengthSingletonRange() { maximumLength(Collections.singleton(Range.singleton(2L))); }
@Test public void testMaximumLengthEmpty() { assertEquals(-1L, maximumLength(Collections.<Range<Long>>emptySet())); }
@Test public void testMaximumLengthSingletonZero() { assertEquals(0L, maximumLength(Collections.singleton(Range.closedOpen(0L, 0L)))); }
@Test public void testMaximumLengthSingletonOne() { assertEquals(1L, maximumLength(Collections.singleton(Range.closedOpen(0L, 1L)))); }
@Test public void testMaximumLengthSingletonFromZero() { assertEquals(43L, maximumLength(Collections.singleton(Range.closedOpen(0L, 43L)))); }
@Test public void testMaximumLengthSingletonFromOne() { assertEquals(42L, maximumLength(Collections.singleton(Range.closedOpen(1L, 43L)))); }
@Test public void testMaximumLength() { assertEquals(43L, maximumLength(ranges)); }
@Test public void testMaximumLengthsRangeSet() { assertEquals(43L, maximumLength(rangeSet.asRanges())); }