### Question:
RangeLongBlock implements Comparable<RangeLongBlock>, Iterable<Long> { @Override public int compareTo(RangeLongBlock o) { if (myStartValue == o.myStartValue && myEndValue == o.myEndValue) { return 0; } else if (myEndValue < o.myStartValue || o.myEndValue < myStartValue) { return myEndValue < o.myStartValue ? -1 : 1; } else { return myStartValue < o.myStartValue ? -1 : 1; } } 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 testCompareTo() { RangeLongBlock aBlock = new RangeLongBlock(1, 10); RangeLongBlock bBlock = new RangeLongBlock(1, 10); RangeLongBlock cBlock = new RangeLongBlock(2, 4); RangeLongBlock dBlock = new RangeLongBlock(1, 4); RangeLongBlock eBlock = new RangeLongBlock(2, 10); RangeLongBlock fBlock = new RangeLongBlock(-3, -1); RangeLongBlock gBlock = new RangeLongBlock(33, 34); Assert.assertEquals(0, aBlock.compareTo(bBlock)); Assert.assertEquals(-1, aBlock.compareTo(cBlock)); Assert.assertEquals(1, aBlock.compareTo(dBlock)); Assert.assertEquals(-1, aBlock.compareTo(eBlock)); Assert.assertEquals(1, aBlock.compareTo(fBlock)); Assert.assertEquals(-1, aBlock.compareTo(gBlock)); }