### Question:
PolyUtil { public static boolean isClosedPolygon(List<LatLng> poly) { LatLng firstPoint = poly.get(0); LatLng lastPoint = poly.get(poly.size() - 1); return firstPoint.equals(lastPoint); } private  PolyUtil(); static boolean containsLocation(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean containsLocation(double latitude, double longitude, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic,
                                           double tolerance); static boolean isLocationOnEdge(LatLng point, List<LatLng> polygon, boolean geodesic); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic, double tolerance); static boolean isLocationOnPath(LatLng point, List<LatLng> polyline,
                                           boolean geodesic); static int locationIndexOnPath(LatLng point, List<LatLng> poly,
                                          boolean geodesic, double tolerance); static int locationIndexOnPath(LatLng point, List<LatLng> polyline,
                                          boolean geodesic); static int locationIndexOnEdgeOrPath(LatLng point, List<LatLng> poly, boolean closed,
                                                boolean geodesic, double toleranceEarth); static List<LatLng> simplify(List<LatLng> poly, double tolerance); static boolean isClosedPolygon(List<LatLng> poly); static double distanceToLine(final LatLng p, final LatLng start, final LatLng end); static List<LatLng> decode(final String encodedPath); static String encode(final List<LatLng> path); static final double DEFAULT_TOLERANCE; }### Answer:
@Test public void testIsClosedPolygon() { ArrayList<LatLng> poly = new ArrayList<>(); poly.add(new LatLng(28.06025, -82.41030)); poly.add(new LatLng(28.06129, -82.40945)); poly.add(new LatLng(28.06206, -82.40917)); poly.add(new LatLng(28.06125, -82.40850)); poly.add(new LatLng(28.06035, -82.40834)); assertFalse(PolyUtil.isClosedPolygon(poly)); poly.add(new LatLng(28.06025, -82.41030)); assertTrue(PolyUtil.isClosedPolygon(poly)); }