### Question:
B2PartSpec implements Comparable<B2PartSpec> { @Override public int compareTo(B2PartSpec o) { return comparator.compare(this, o); } B2PartSpec(int partNumber,
               long start,
               long length); int getPartNumber(); long getStart(); long getLength(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(B2PartSpec o);  }### Answer:
@Test public void testCompareTo() { final B2PartSpec a1 = new B2PartSpec(1, 0, 100); final B2PartSpec a2 = new B2PartSpec(1, 0, 100); assertEquals(0, a1.compareTo(a2)); final B2PartSpec b = new B2PartSpec(2, 0, 100); assertTrue(b.compareTo(a1) > 0); final B2PartSpec c = new B2PartSpec(1, 1, 100); assertTrue(c.compareTo(a1) > 0); final B2PartSpec d = new B2PartSpec(1, 0, 101); assertTrue(d.compareTo(a1) > 0); }