### Question:
GeoUtils { public static double getLargestDistance(Collection<? extends GeoCoordinate> coordinates) { Validate.notNull(coordinates, "coordinates must not be null"); if (coordinates.contains(null) && coordinates.size() > 1) { return EARTH_MAX_DISTANCE_KM; } double largestDistance = 0; List<GeoCoordinate> temp = new ArrayList<>(new HashSet<>(coordinates)); for (int i = 0; i < temp.size(); i++) { GeoCoordinate c1 = temp.get(i); for (int j = i + 1; j < temp.size(); j++) { GeoCoordinate c2 = temp.get(j); largestDistance = Math.max(largestDistance, c1.distance(c2)); } } return largestDistance; } private  GeoUtils(); static GeoCoordinate getMidpoint(Collection<? extends GeoCoordinate> coordinates); static GeoCoordinate getCenterOfMinimumDistance(Collection<? extends GeoCoordinate> coordinates); static double parseDms(String dmsString); static double approximateDistance(double lat1, double lng1, double lat2, double lng2); static double approximateDistance(GeoCoordinate c1, GeoCoordinate c2); static double computeDistance(double lat1, double lng1, double lat2, double lng2); static boolean isValidCoordinateRange(double lat, double lng); static void validateCoordinateRange(double lat, double lng); static double normalizeLatitude(double lat); static double normalizeLongitude(double lng); static double getLargestDistance(Collection<? extends GeoCoordinate> coordinates); static final String DMS; static final double EARTH_RADIUS_KM; static final double EARTH_CIRCUMFERENCE_KM; static final double EARTH_MAX_DISTANCE_KM; static final Distance<GeoCoordinate> DISTANCE; }### Answer:
@Test public void testGetLargestDistance() { assertEquals(976.3, GeoUtils.getLargestDistance(coordinates1), 0.1); assertEquals(10848.7, GeoUtils.getLargestDistance(coordinates2), 0.1); assertEquals(0, GeoUtils.getLargestDistance(coordinates3), 0.1); assertEquals(0, GeoUtils.getLargestDistance(Collections.<GeoCoordinate> singleton(null)), 0.1); assertEquals(GeoUtils.EARTH_MAX_DISTANCE_KM, GeoUtils.getLargestDistance(Arrays.<GeoCoordinate> asList(null, null)), 0.1); }