LatLngBounds implements Parcelable { @NonNull public LatLng getSouthwest() { return southwest; } LatLngBounds(@NonNull LatLng southwest, @NonNull LatLng northeast); private  LatLngBounds(Parcel in); @NonNull LatLng getSouthwest(); @NonNull LatLng getNortheast(); boolean contains(LatLng point); @NonNull LatLngBounds including(@NonNull LatLng point); @NonNull LatLng getCenter(); @Override int describeContents(); @Override void writeToParcel(Parcel parcel, int i); static final Parcelable.Creator<LatLngBounds> CREATOR; }
@Test public void shouldSetSouthWestPoint() { assertThat(bounds.getSouthwest()).isEqualTo(southWestPoint); }
@Test public void include_shouldSetSouthWestPoint() { LatLng pointA = new LatLng(40, 50); LatLng pointB = new LatLng(-40, -50); LatLngBounds bounds = new LatLngBounds.Builder() .include(pointA) .include(pointB) .build(); assertThat(bounds.getSouthwest().getLatitude()).isEqualTo(-40); assertThat(bounds.getSouthwest().getLongitude()).isEqualTo(-50); }