PointToBoundsConverter { public BoundingBox boundingBoxFromPoint(double latitude, double longitude) { double minLat = latitude - BOUNDS_RADIUS; double minLon = longitude - BOUNDS_RADIUS; double maxLat = latitude + BOUNDS_RADIUS; double maxLon = longitude + BOUNDS_RADIUS; return new BoundingBox(minLat, minLon, maxLat, maxLon); }  LatLngBounds boundsFromPoint(LatLng point); BoundingBox boundingBoxFromPoint(double latitude, double longitude);  }
@Test public void boundingBoxFromPoint_shouldCreateCorrectBounds() throws Exception { BoundingBox bounds = pointConverter.boundingBoxFromPoint(40.0, 70.0); assertThat(bounds.getMinLat()).isEqualTo(39.98); assertThat(bounds.getMinLon()).isEqualTo(69.98); assertThat(bounds.getMaxLat()).isEqualTo(40.02); assertThat(bounds.getMaxLon()).isEqualTo(70.02); }