### Question:
IntervalCategoryToolTipGenerator extends StandardCategoryToolTipGenerator { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof IntervalCategoryToolTipGenerator)) { return false; } return super.equals(obj); } IntervalCategoryToolTipGenerator();  IntervalCategoryToolTipGenerator(String labelFormat,
                                            NumberFormat formatter);  IntervalCategoryToolTipGenerator(String labelFormat,
                                            DateFormat formatter); @Override boolean equals(Object obj); static final String DEFAULT_TOOL_TIP_FORMAT_STRING; }### Answer:
@Test public void testEquals() { IntervalCategoryToolTipGenerator g1 = new IntervalCategoryToolTipGenerator(); IntervalCategoryToolTipGenerator g2 = new IntervalCategoryToolTipGenerator(); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new IntervalCategoryToolTipGenerator("{3} - {4}", new DecimalFormat("0.000")); assertFalse(g1.equals(g2)); g2 = new IntervalCategoryToolTipGenerator("{3} - {4}", new DecimalFormat("0.000")); assertEquals(g1, g2); g1 = new IntervalCategoryToolTipGenerator("{3} - {4}", new SimpleDateFormat("d-MMM")); assertFalse(g1.equals(g2)); g2 = new IntervalCategoryToolTipGenerator("{3} - {4}", new SimpleDateFormat("d-MMM")); assertEquals(g1, g2); }
@Test public void testEquals2() { IntervalCategoryToolTipGenerator g1 = new IntervalCategoryToolTipGenerator(); StandardCategoryToolTipGenerator g2 = new StandardCategoryToolTipGenerator( IntervalCategoryToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT_STRING, NumberFormat.getInstance()); assertFalse(g1.equals(g2)); }