### Question:
Datable implements Comparable<Datable>, Serializable, Range { @Override public int compareTo(Datable other) { if (other == null) { throw new NullPointerException(); } int compareFrom = getFromDate().compareTo(other.getFromDate()); return (compareFrom != 0) ? compareFrom : (getToDate().compareTo(other.getToDate())); } Datable(String edtf); String getEdtf(); boolean isFloruit(); Certainty getCertainty(); Date getFromDate(); Date getToDate(); @Override @JsonValue String toString(); int getFromYear(); int getToYear(); @Override int compareTo(Datable other); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isValid(); @Override Object getUpperLimit(); @Override Object getLowerLimit();  }### Answer:
@Test public void testCompareToEqualSameEdtf() { Datable first = new Datable("20131011"); Datable second = new Datable("20131011"); assertEquals(0, first.compareTo(second)); }
@Test public void testCompareToSmaller() { Datable first = new Datable("20131010"); Datable second = new Datable("20131011"); assertEquals(-1, first.compareTo(second)); }
@Test public void testCompareToBigger() { Datable first = new Datable("20131011"); Datable second = new Datable("20131010"); assertEquals(1, first.compareTo(second)); }