### Question:
CombinedDomainCategoryPlot extends CategoryPlot implements PlotChangeListener { @Override public Object clone() throws CloneNotSupportedException { CombinedDomainCategoryPlot result = (CombinedDomainCategoryPlot) super.clone(); result.subplots = ObjectUtilities.deepClone(this.subplots); for (CategoryPlot child : this.subplots) { child.setParent(result); } return result; } CombinedDomainCategoryPlot();  CombinedDomainCategoryPlot(CategoryAxis domainAxis); double getGap(); void setGap(double gap); void add(CategoryPlot subplot); void add(CategoryPlot subplot, int weight); void remove(CategoryPlot subplot); List<CategoryPlot> getSubplots(); CategoryPlot findSubplot(PlotRenderingInfo info, Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo info, Point2D source); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override void setOrientation(PlotOrientation orientation); @Override void setShadowGenerator(ShadowGenerator generator); @Override Range getDataRange(ValueAxis axis); @Override List<LegendItem> getLegendItems(); @Override List<Comparable> getCategories(); @Override List<Comparable> getCategoriesForAxis(CategoryAxis axis); @Override void handleClick(int x, int y, PlotRenderingInfo info); @Override void plotChanged(PlotChangeEvent event); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testCloning() throws CloneNotSupportedException { CombinedDomainCategoryPlot plot1 = createPlot(); CombinedDomainCategoryPlot plot2 = (CombinedDomainCategoryPlot) plot1.clone(); assertNotSame(plot1, plot2); assertSame(plot1.getClass(), plot2.getClass()); assertEquals(plot1, plot2); }