TrailStatisticsImpl implements TrailStatistics { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TrailStatisticsImpl other = (TrailStatisticsImpl) obj; return Objects.equals(this.time, other.getTimeDifferenceSummary()) && Objects.equals(this.dist, other.getDistanceSummary()) && Objects.equals(this.eleDiff, other.getElevationDifferenceSummary()) && Objects.equals(this.speed, other.getSpeedSummary()) && Objects.equals(this.grade, other.getGradeSummary()) && Objects.equals(this.ele, other.getElevationSummary()); } TrailStatisticsImpl(
      final Statistics time,
      final Statistics dist,
      final Statistics ele,
      final Statistics eleDiff,
      final Statistics speed,
      final Statistics grade); @Override Statistics getTimeDifferenceSummary(); @Override Statistics getDistanceSummary(); @Override Statistics getElevationDifferenceSummary(); @Override Statistics getSpeedSummary(); @Override Statistics getGradeSummary(); @Override Statistics getElevationSummary(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void checkTypeEquality() { final TrailStatistics stats1 = getStats(); assertFalse(stats1.equals("test")); }
@Test public void checkEquality() { final TrailStatistics stats1 = getStats(); final TrailStatistics stats2 = getStats(); final TrailStatistics stats3 = getStats2(); assertEquals(stats1, stats2); assertFalse(stats1.equals(stats3)); }
@Test public void checkNullEquality() { final TrailStatistics stats1 = getStats(); assertFalse(stats1.equals(null)); }