### Question:
VisibleRegion implements Parcelable { @Override public boolean equals(Object o) { if (!(o instanceof VisibleRegion)) { return false; } if (o == this) { return true; } VisibleRegion visibleRegion = (VisibleRegion) o; return farLeft.equals(visibleRegion.farLeft) && farRight.equals(visibleRegion.farRight) && nearLeft.equals(visibleRegion.nearLeft) && nearRight.equals(visibleRegion.nearRight) && latLngBounds.equals(visibleRegion.latLngBounds); } private  VisibleRegion(Parcel in);  VisibleRegion(LatLng farLeft, LatLng farRight, LatLng nearLeft, LatLng nearRight, LatLngBounds latLngBounds); @Override boolean equals(Object o); @NonNull @Override String toString(); @Override int hashCode(); @Override int describeContents(); @Override void writeToParcel(@NonNull Parcel out, int flags); final LatLng farLeft; final LatLng farRight; final LatLng nearLeft; final LatLng nearRight; final LatLngBounds latLngBounds; static final Parcelable.Creator<VisibleRegion> CREATOR; }### Answer:
@Test public void testEquality() { VisibleRegion region = new VisibleRegion(FAR_LEFT, FAR_RIGHT, NEAR_LEFT, NEAR_RIGHT, BOUNDS); assertEquals("visibleRegion is not equal to a LatLng", region.equals(FAR_LEFT), false); assertEquals("visibleRegion is equal to itself", region.equals(region), true); }
@Test public void testEquals() { VisibleRegion regionLeft = new VisibleRegion(FAR_LEFT, FAR_RIGHT, NEAR_LEFT, NEAR_RIGHT, BOUNDS); VisibleRegion regionRight = new VisibleRegion(FAR_LEFT, FAR_RIGHT, NEAR_LEFT, NEAR_RIGHT, BOUNDS); assertEquals("VisibleRegions should match", regionLeft, regionRight); }