### Question:
XYBlockRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBlockRenderer)) { return false; } XYBlockRenderer that = (XYBlockRenderer) obj; if (this.blockHeight != that.blockHeight) { return false; } if (this.blockWidth != that.blockWidth) { return false; } if (!this.blockAnchor.equals(that.blockAnchor)) { return false; } if (!this.paintScale.equals(that.paintScale)) { return false; } return super.equals(obj); } XYBlockRenderer(); double getBlockWidth(); void setBlockWidth(double width); double getBlockHeight(); void setBlockHeight(double height); RectangleAnchor getBlockAnchor(); void setBlockAnchor(RectangleAnchor anchor); PaintScale getPaintScale(); void setPaintScale(PaintScale scale); @Override Range findDomainBounds(XYDataset dataset); @Override Range findRangeBounds(XYDataset dataset); @Override void drawItem(Graphics2D g2, XYItemRendererState state,
            Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
            ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset,
            int series, int item, CrosshairState crosshairState, int pass); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testEquals() { XYBlockRenderer r1 = new XYBlockRenderer(); XYBlockRenderer r2 = new XYBlockRenderer(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setBlockHeight(2.0); assertFalse(r1.equals(r2)); r2.setBlockHeight(2.0); assertEquals(r1, r2); r1.setBlockWidth(2.0); assertFalse(r1.equals(r2)); r2.setBlockWidth(2.0); assertEquals(r1, r2); r1.setPaintScale(new GrayPaintScale(0.0, 1.0)); assertFalse(r1.equals(r2)); r2.setPaintScale(new GrayPaintScale(0.0, 1.0)); assertEquals(r1, r2); }