GuidanceSpeedData implements Parcelable { @Override public int hashCode() { long var = Double.doubleToLongBits(this.mCurrentSpeed); int var1 = (int) (var ^ var >>> 32) * 31; long var2 = Double.doubleToLongBits(this.mCurrentSpeedLimit); return var1 + (int) (var2 ^ var2 >>> 32); } GuidanceSpeedData(Double speed, Double speedLimit); protected  GuidanceSpeedData(Parcel in); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); Double getCurrentSpeed(); Double getCurrentSpeedLimit(); boolean isSpeeding(); boolean isValid(); @NonNull @Override String toString(); @Override int hashCode(); @Override boolean equals(Object var1); static final Creator<GuidanceSpeedData> CREATOR; }
@Test public void testEquality() { GuidanceSpeedData data1 = new GuidanceSpeedData(VELOCITY, SPEED_LIMIT); assertThat(data1, is(mCurrentSpeedData)); final double speed = 70; GuidanceSpeedData data2 = new GuidanceSpeedData(speed, SPEED_LIMIT); assertThat(mCurrentSpeedData, is(not(data2))); assertThat(null, is(not(mCurrentSpeedData))); assertThat(mCurrentSpeedData.hashCode(), is(data1.hashCode())); }