### Question:
PointList implements Iterable<GHPoint3D>, PointAccess { public PointList clone(boolean reverse) { PointList clonePL = new PointList(getSize(), is3D()); if (is3D()) for (int i = 0; i < getSize(); i++) { clonePL.add(getLatitude(i), getLongitude(i), getElevation(i)); } else for (int i = 0; i < getSize(); i++) { clonePL.add(getLatitude(i), getLongitude(i)); } if (reverse) clonePL.reverse(); return clonePL; } PointList();  PointList(int cap, boolean is3D); @Override boolean is3D(); @Override int getDimension(); @Override void ensureNode(int nodeId); @Override void setNode(int nodeId, double lat, double lon); @Override void setNode(int nodeId, double lat, double lon, double ele); void set(int index, double lat, double lon, double ele); void add(double lat, double lon); void add(double lat, double lon, double ele); void add(PointAccess nodeAccess, int index); void add(GHPoint point); void add(PointList points); void removeLastPoint(); int size(); int getSize(); boolean isEmpty(); @Override double getLat(int index); @Override double getLatitude(int index); @Override double getLon(int index); @Override double getLongitude(int index); @Override double getElevation(int index); void setElevation(int index, double ele); @Override double getEle(int index); void reverse(); void clear(); void trimToSize(int newSize); @Override String toString(); static PointList fromLineString(LineString lineString); LineString toLineString(boolean includeElevation); LineString getCachedLineString(boolean includeElevation); @Override boolean equals(Object obj); static boolean equalsEps(double d1, double d2); static boolean equalsEps(double d1, double d2, double epsilon); PointList clone(boolean reverse); PointList copy(int from, int end); PointList shallowCopy(final int from, final int end, boolean makeImmutable); @Override int hashCode(); double calcDistance(DistanceCalc calc); void parse2DJSON(String str); GHPoint3D get(int index); @Override Iterator<GHPoint3D> iterator(); static PointList from(LineString lineString); boolean isImmutable(); PointList makeImmutable(); static final PointList EMPTY; }### Answer:
@Test() public void testClone() { PointList pl = new PointList(3, true); pl.add(0, 0, 0); pl.add(1, 1, 1); pl.add(2, 2, 2); PointList shallowPl = pl.shallowCopy(1, 3, false); PointList clonedPl = shallowPl.clone(false); assertEquals(shallowPl, clonedPl); clonedPl.setNode(0, 5, 5, 5); assertNotEquals(shallowPl, clonedPl); }