### Question:
StandardXYToolTipGenerator extends AbstractXYItemLabelGenerator implements XYToolTipGenerator, Cloneable, PublicCloneable,
                   Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYToolTipGenerator)) { return false; } return super.equals(obj); } StandardXYToolTipGenerator();  StandardXYToolTipGenerator(String formatString,
            NumberFormat xFormat, NumberFormat yFormat);  StandardXYToolTipGenerator(String formatString, DateFormat xFormat,
            NumberFormat yFormat);  StandardXYToolTipGenerator(String formatString,
            NumberFormat xFormat, DateFormat yFormat);  StandardXYToolTipGenerator(String formatString,
            DateFormat xFormat, DateFormat yFormat); static StandardXYToolTipGenerator getTimeSeriesInstance(); @Override String generateToolTip(XYDataset dataset, int series, int item); @Override boolean equals(Object obj); @Override Object clone(); static final String DEFAULT_TOOL_TIP_FORMAT; }### Answer:
@Test public void testEquals() { String f1 = "{1}"; String f2 = "{2}"; NumberFormat xnf1 = new DecimalFormat("0.00"); NumberFormat xnf2 = new DecimalFormat("0.000"); NumberFormat ynf1 = new DecimalFormat("0.00"); NumberFormat ynf2 = new DecimalFormat("0.000"); StandardXYToolTipGenerator g1; StandardXYToolTipGenerator g2; g1 = new StandardXYToolTipGenerator(f1, xnf1, ynf1); g2 = new StandardXYToolTipGenerator(f1, xnf1, ynf1); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new StandardXYToolTipGenerator(f2, xnf1, ynf1); assertFalse(g1.equals(g2)); g2 = new StandardXYToolTipGenerator(f2, xnf1, ynf1); assertEquals(g1, g2); g1 = new StandardXYToolTipGenerator(f2, xnf2, ynf1); assertFalse(g1.equals(g2)); g2 = new StandardXYToolTipGenerator(f2, xnf2, ynf1); assertEquals(g1, g2); g1 = new StandardXYToolTipGenerator(f2, xnf2, ynf2); assertFalse(g1.equals(g2)); g2 = new StandardXYToolTipGenerator(f2, xnf2, ynf2); assertEquals(g1, g2); DateFormat xdf1 = new SimpleDateFormat("d-MMM"); DateFormat xdf2 = new SimpleDateFormat("d-MMM-yyyy"); DateFormat ydf1 = new SimpleDateFormat("d-MMM"); DateFormat ydf2 = new SimpleDateFormat("d-MMM-yyyy"); g1 = new StandardXYToolTipGenerator(f1, xdf1, ydf1); g2 = new StandardXYToolTipGenerator(f1, xdf1, ydf1); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new StandardXYToolTipGenerator(f1, xdf2, ydf1); assertFalse(g1.equals(g2)); g2 = new StandardXYToolTipGenerator(f1, xdf2, ydf1); assertEquals(g1, g2); g1 = new StandardXYToolTipGenerator(f1, xdf2, ydf2); assertFalse(g1.equals(g2)); g2 = new StandardXYToolTipGenerator(f1, xdf2, ydf2); assertEquals(g1, g2); }