### Question:
LatLng implements Parcelable { public void setLongitude(@FloatRange(from = GeometryConstants.MIN_LONGITUDE, to = GeometryConstants.MAX_LONGITUDE) double longitude) { if (Double.isNaN(longitude)) { throw new IllegalArgumentException("longitude must not be NaN"); } if (Double.isInfinite(longitude)) { throw new IllegalArgumentException("longitude must not be infinite"); } this.longitude = longitude; } LatLng(); @Keep  LatLng(double latitude, double longitude);  LatLng(double latitude, double longitude, double altitude);  LatLng(Location location);  LatLng(LatLng latLng); protected  LatLng(Parcel in); void setLatitude(
    @FloatRange(from = GeometryConstants.MIN_LATITUDE, to = GeometryConstants.MAX_LATITUDE) double latitude); double getLatitude(); void setLongitude(@FloatRange(from = GeometryConstants.MIN_LONGITUDE, to = GeometryConstants.MAX_LONGITUDE)
                             double longitude); double getLongitude(); void setAltitude(double altitude); double getAltitude(); @NonNull LatLng wrap(); @Override boolean equals(@Nullable Object object); @Override int hashCode(); @NonNull @Override String toString(); @Override int describeContents(); @Override void writeToParcel(@NonNull Parcel out, int flags); double distanceTo(@NonNull LatLng other); static final Parcelable.Creator<LatLng> CREATOR; }### Answer:
@Test public void testLongitudeSetterChecksNaN() { exception.expect(IllegalArgumentException.class); exception.expectMessage("longitude must not be NaN"); new LatLng().setLongitude(Double.NaN); }
@Test public void testLongitudeSetterChecksInfinity() { exception.expect(IllegalArgumentException.class); exception.expectMessage("longitude must not be infinite"); new LatLng().setLongitude(Double.NEGATIVE_INFINITY); }