### Question:
RangeLongBlock implements Comparable<RangeLongBlock>, Iterable<Long> { public static boolean isContiguous(long[] values) { if (values.length == 1) { return true; } boolean contiguous = true; for (int i = 1; i < values.length && contiguous; i++) { if (values[i - 1] != values[i] && values[i - 1] != values[i] - 1) { contiguous = false; break; } } return contiguous; } RangeLongBlock(long value);  RangeLongBlock(long startValue, long endValue);  RangeLongBlock(RangeLongBlock other); static List<RangeLongBlock> createRangeLongBlocks(Collection<? extends Long> values); static List<RangeLongBlock> createRangeLongBlocks(long[] values); static List<RangeLongBlock> createRangeLongBlocks(Long[] values); static List<RangeLongBlock> createSubBlocksByRemovingValue(RangeLongBlock block, long valueToRemove); static boolean isContiguous(long[] values); static RangeLongBlock merge(RangeLongBlock one, RangeLongBlock two); boolean borders(long value); boolean borders(RangeLongBlock block); @Override int compareTo(RangeLongBlock o); boolean containsValue(long value); @Override boolean equals(Object obj); boolean formsContiguousRange(RangeLongBlock other); long getEnd(); RangeRelationType getRelation(RangeLongBlock block); long getStart(); @Override int hashCode(); RangeLongBlock intersection(RangeLongBlock other); boolean isAfter(RangeLongBlock other); boolean isBefore(RangeLongBlock other); @Override Iterator<Long> iterator(); boolean overlaps(RangeLongBlock other); int size(); @Override String toString();  }### Answer:
@Test public void testStaticIsContiguous() { long[] contigSet = { 5, 6, 7, 8 }; long[] contigSetWithDupes = { 5, 6, 7, 7, 8 }; long[] nonContigSet = { 5, 6, 8, 9 }; long[] unorderedButCongitIfSorted = { 7, 5, 6, 8 }; long[] random = { 23, 88, 234, -12 }; long[] oneValue = { 8 }; long[] contigReverse = { 9, 8, 7, 6 }; Assert.assertTrue(RangeLongBlock.isContiguous(contigSet)); Assert.assertTrue(RangeLongBlock.isContiguous(contigSetWithDupes)); Assert.assertFalse(RangeLongBlock.isContiguous(nonContigSet)); Assert.assertFalse(RangeLongBlock.isContiguous(unorderedButCongitIfSorted)); Arrays.sort(unorderedButCongitIfSorted); Assert.assertTrue(RangeLongBlock.isContiguous(unorderedButCongitIfSorted)); Assert.assertFalse(RangeLongBlock.isContiguous(random)); Arrays.sort(random); Assert.assertFalse(RangeLongBlock.isContiguous(random)); Assert.assertTrue(RangeLongBlock.isContiguous(oneValue)); Assert.assertFalse(RangeLongBlock.isContiguous(contigReverse)); Arrays.sort(contigReverse); Assert.assertTrue(RangeLongBlock.isContiguous(contigReverse)); }