### Question:
LevelRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LevelRenderer)) { return false; } LevelRenderer that = (LevelRenderer) obj; if (this.itemMargin != that.itemMargin) { return false; } if (this.maxItemWidth != that.maxItemWidth) { return false; } return super.equals(obj); } LevelRenderer(); double getItemMargin(); void setItemMargin(double percent); double getMaximumItemWidth(); void setMaximumItemWidth(double percent); @Override CategoryItemRendererState initialise(Graphics2D g2,
            Rectangle2D dataArea, CategoryPlot plot, int rendererIndex,
            PlotRenderingInfo info); @Override void drawItem(Graphics2D g2, CategoryItemRendererState state,
            Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
            ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
            int pass); @Override double getItemMiddle(Comparable rowKey, Comparable columnKey,
            CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
            RectangleEdge edge); @Override boolean equals(Object obj); @Override int hashCode(); static final double DEFAULT_ITEM_MARGIN; }### Answer:
@Test public void testEquals() { LevelRenderer r1 = new LevelRenderer(); LevelRenderer r2 = new LevelRenderer(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setItemMargin(0.123); assertFalse(r1.equals(r2)); r2.setItemMargin(0.123); assertEquals(r1, r2); r1.setMaximumItemWidth(0.234); assertFalse(r1.equals(r2)); r2.setMaximumItemWidth(0.234); assertEquals(r1, r2); }