### Question:
StackedAreaRenderer extends AreaRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StackedAreaRenderer)) { return false; } StackedAreaRenderer that = (StackedAreaRenderer) obj; if (this.renderAsPercentages != that.renderAsPercentages) { return false; } return super.equals(obj); } StackedAreaRenderer();  StackedAreaRenderer(boolean renderAsPercentages); boolean getRenderAsPercentages(); void setRenderAsPercentages(boolean asPercentages); @Override int getPassCount(); @Override Range findRangeBounds(CategoryDataset dataset); @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() { StackedAreaRenderer r1 = new StackedAreaRenderer(); StackedAreaRenderer r2 = new StackedAreaRenderer(); assertEquals(r1, r2); r1.setRenderAsPercentages(true); assertFalse(r1.equals(r2)); r2.setRenderAsPercentages(true); assertEquals(r1, r2); }