### Question:
AreaRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof AreaRenderer)) { return false; } AreaRenderer that = (AreaRenderer) obj; if (!this.endType.equals(that.endType)) { return false; } return super.equals(obj); } AreaRenderer(); AreaRendererEndType getEndType(); void setEndType(AreaRendererEndType type); @Override LegendItem getLegendItem(int datasetIndex, int series); @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); @Override Object clone();  }### Answer:
@Test public void testEquals() { AreaRenderer r1 = new AreaRenderer(); AreaRenderer r2 = new AreaRenderer(); assertEquals(r1, r2); r1.setEndType(AreaRendererEndType.LEVEL); assertFalse(r1.equals(r2)); r2.setEndType(AreaRendererEndType.LEVEL); assertEquals(r1, r2); }