GuidanceEstimatedArrivalViewData implements Parcelable { @Override public int hashCode() { return ((this.mDuration * 31 + (int) (this.mDistance ^ this.mDistance >>> 32)) * 31 + (this.mEta == null ? 0 : this.mEta.hashCode())) * 31; } GuidanceEstimatedArrivalViewData(Date etaDate, Long distance, Integer duration); protected  GuidanceEstimatedArrivalViewData(Parcel in); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); Date getEta(); Long getDistance(); Integer getDuration(); @NonNull @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj1); static final Creator<GuidanceEstimatedArrivalViewData> CREATOR; }
@Test public void testEquality() { GuidanceEstimatedArrivalViewData data = new GuidanceEstimatedArrivalViewData(ETA_DATE, DISTANCE, DURATION); assertThat(mEstimatedArrivalData, is(data)); GuidanceEstimatedArrivalViewData data1 = new GuidanceEstimatedArrivalViewData(ETA_DATE, DISTANCE, 1); assertThat(mEstimatedArrivalData, is(not(data1))); assertThat(null, is(not(mEstimatedArrivalData))); assertThat(mEstimatedArrivalData.hashCode(), is(data.hashCode())); }