ExcelRow implements Comparable<T>, Serializable { @Override public int compareTo(T excelRow) { int result; if (excelRow == this) { result = 0; } else if (excelRow == null) { result = 1; } else { result = new CompareToBuilder() .append(this.getDate(), excelRow.getDate()) .append(this.getExpectedDepartureTime(), excelRow.getExpectedDepartureTime()) .append(this.getExpectedArrivalTime(), excelRow.getExpectedArrivalTime()) .toComparison(); } return result; } protected  ExcelRow(final Builder builder); @Override int compareTo(T excelRow); LocalDate getDate(); Station getArrivalStation(); Station getDepartureStation(); Station getLinkStation(); LocalTime getExpectedDepartureTime(); LocalTime getExpectedArrivalTime(); TrainLine getExpectedTrainLine1(); TrainLine getExpectedTrainLine2(); LocalTime getEffectiveDepartureTime(); LocalTime getEffectiveArrivalTime(); TrainLine getEffectiveTrainLine1(); TrainLine getEffectiveTrainLine2(); Long getDelay(); Sens getSens(); Long getId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testCompareToEquals() { assertThat(DATA_POINT1.compareTo(DATA_POINT2), is(equalTo(0))); }
@Test public void testCompareToGreater() { assertThat(DATA_POINT4.compareTo(DATA_POINT1), is(greaterThan(0))); }
@Test public void testCompareToLess() { assertThat(DATA_POINT1.compareTo(DATA_POINT4), is(lessThan(0))); }