### Question:
XYLine3DRenderer extends XYLineAndShapeRenderer implements Effect3D, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYLine3DRenderer)) { return false; } XYLine3DRenderer that = (XYLine3DRenderer) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); } XYLine3DRenderer(); @Override double getXOffset(); @Override double getYOffset(); void setXOffset(double xOffset); void setYOffset(double yOffset); Paint getWallPaint(); void setWallPaint(Paint paint); @Override int getPassCount(); @Override boolean equals(Object obj); static final double DEFAULT_X_OFFSET; static final double DEFAULT_Y_OFFSET; static final Paint DEFAULT_WALL_PAINT; }### Answer:
@Test public void testEquals() { XYLine3DRenderer r1 = new XYLine3DRenderer(); XYLine3DRenderer r2 = new XYLine3DRenderer(); assertEquals(r1, r2); r1.setXOffset(11.1); assertFalse(r1.equals(r2)); r2.setXOffset(11.1); assertEquals(r1, r2); r1.setYOffset(11.1); assertFalse(r1.equals(r2)); r2.setYOffset(11.1); assertEquals(r1, r2); r1.setWallPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertFalse(r1.equals(r2)); r2.setWallPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertEquals(r1, r2); }