### Question:
IntervalBarRenderer extends BarRenderer { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof IntervalBarRenderer)) { return false; } return super.equals(obj); } IntervalBarRenderer(); @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() { IntervalBarRenderer r1 = new IntervalBarRenderer(); IntervalBarRenderer r2 = new IntervalBarRenderer(); assertEquals(r1, r2); BarRenderer br = new BarRenderer(); assertFalse(r1.equals(br)); }