### Question:
BoxAndWhiskerXYToolTipGenerator extends StandardXYToolTipGenerator implements XYToolTipGenerator, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerXYToolTipGenerator)) { return false; } return super.equals(obj); } BoxAndWhiskerXYToolTipGenerator();  BoxAndWhiskerXYToolTipGenerator(String toolTipFormat,
                                           DateFormat dateFormat,
                                           NumberFormat numberFormat); @Override boolean equals(Object obj); static final String DEFAULT_TOOL_TIP_FORMAT; }### Answer:
@Test public void testEquals() { BoxAndWhiskerXYToolTipGenerator g1 = new BoxAndWhiskerXYToolTipGenerator(); BoxAndWhiskerXYToolTipGenerator g2 = new BoxAndWhiskerXYToolTipGenerator(); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); g2 = new BoxAndWhiskerXYToolTipGenerator("{1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); assertFalse(g1.equals(g2)); g2 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); assertEquals(g1, g2); g1 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); g2 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("MMM-yyyy"), new DecimalFormat("0.0")); assertFalse(g1.equals(g2)); g2 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); assertEquals(g1, g2); g1 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); g2 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.00")); assertFalse(g1.equals(g2)); g2 = new BoxAndWhiskerXYToolTipGenerator("{0} --> {1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")); assertEquals(g1, g2); }