### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } Interval(MutableInterval<T> other);  Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point); boolean isLeftOf(int point); boolean isRightOf(int point); boolean contains(int point); boolean overlapsWith(int begin, int end); @Override int hashCode(); @Override boolean equals(Object obj); int compareTo(Interval<T> o); @Override String toString();  }### Answer:
@Test public void testCompareTo() { Assert.assertTrue(interval.compareTo(new Interval<String>(0, 10, "y", 10)) > 0); Assert.assertTrue(interval.compareTo(new Interval<String>(1, 9, "y", 10)) > 0); Assert.assertTrue(interval.compareTo(new Interval<String>(1, 10, "y", 10)) == 0); Assert.assertTrue(interval.compareTo(new Interval<String>(1, 11, "y", 10)) < 0); Assert.assertTrue(interval.compareTo(new Interval<String>(2, 10, "y", 10)) < 0); }