### Question:
MinMaxCategoryRenderer extends AbstractCategoryItemRenderer { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MinMaxCategoryRenderer)) { return false; } MinMaxCategoryRenderer that = (MinMaxCategoryRenderer) obj; if (this.plotLines != that.plotLines) { return false; } if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) { return false; } if (!this.groupStroke.equals(that.groupStroke)) { return false; } return super.equals(obj); } MinMaxCategoryRenderer(); boolean isDrawLines(); void setDrawLines(boolean draw); Paint getGroupPaint(); void setGroupPaint(Paint paint); Stroke getGroupStroke(); void setGroupStroke(Stroke stroke); Icon getObjectIcon(); void setObjectIcon(Icon icon); Icon getMaxIcon(); void setMaxIcon(Icon icon); Icon getMinIcon(); void setMinIcon(Icon icon); @Override void drawItem(Graphics2D g2, CategoryItemRendererState state,
            Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
            ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
            int pass); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals() { MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer(); MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer(); assertEquals(r1, r2); r1.setDrawLines(true); assertFalse(r1.equals(r2)); r2.setDrawLines(true); assertEquals(r1, r2); r1.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertFalse(r1.equals(r2)); r2.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertEquals(r1, r2); r1.setGroupStroke(new BasicStroke(1.2f)); assertFalse(r1.equals(r2)); r2.setGroupStroke(new BasicStroke(1.2f)); assertEquals(r1, r2); }