### Question:
CombinedRangeXYPlot extends XYPlot implements PlotChangeListener { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CombinedRangeXYPlot)) { return false; } CombinedRangeXYPlot that = (CombinedRangeXYPlot) obj; if (this.gap != that.gap) { return false; } if (!ObjectUtils.equal(this.subplots, that.subplots)) { return false; } return super.equals(obj); } CombinedRangeXYPlot();  CombinedRangeXYPlot(ValueAxis rangeAxis); @Override String getPlotType(); double getGap(); void setGap(double gap); void add(XYPlot subplot); void add(XYPlot subplot, int weight); void remove(XYPlot subplot); List<XYPlot> getSubplots(); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override List<LegendItem> getLegendItems(); @Override void zoomDomainAxes(double factor, PlotRenderingInfo info,
                               Point2D source); @Override void zoomDomainAxes(double factor, PlotRenderingInfo info,
                               Point2D source, boolean useAnchor); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo info, Point2D source); @Override void panDomainAxes(double panRange, PlotRenderingInfo info,
            Point2D source); XYPlot findSubplot(PlotRenderingInfo info, Point2D source); @Override void setRenderer(XYItemRenderer renderer); @Override void setOrientation(PlotOrientation orientation); @Override void setShadowGenerator(ShadowGenerator generator); @Override Range getDataRange(ValueAxis 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 testEquals() { CombinedRangeXYPlot plot1 = createPlot(); CombinedRangeXYPlot plot2 = createPlot(); assertEquals(plot1, plot2); assertEquals(plot2, plot1); }