### Question:
MultipleXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
        Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MultipleXYSeriesLabelGenerator)) { return false; } MultipleXYSeriesLabelGenerator that = (MultipleXYSeriesLabelGenerator) obj; if (!this.formatPattern.equals(that.formatPattern)) { return false; } if (!this.additionalFormatPattern.equals( that.additionalFormatPattern)) { return false; } if (!this.seriesLabelLists.equals(that.seriesLabelLists)) { return false; } return true; } MultipleXYSeriesLabelGenerator();  MultipleXYSeriesLabelGenerator(String format); void addSeriesLabel(int series, String label); void clearSeriesLabels(int series); @Override String generateLabel(XYDataset dataset, int series); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); static final String DEFAULT_LABEL_FORMAT; }### Answer:
@Test public void testEquals() { MultipleXYSeriesLabelGenerator g1 = new MultipleXYSeriesLabelGenerator(); MultipleXYSeriesLabelGenerator g2 = new MultipleXYSeriesLabelGenerator(); assertEquals(g1, g2); assertEquals(g2, g1); g1 = new MultipleXYSeriesLabelGenerator("Series {0}"); assertFalse(g1.equals(g2)); g2 = new MultipleXYSeriesLabelGenerator("Series {0}"); assertEquals(g1, g2); g1.addSeriesLabel(1, "Additional 1"); assertFalse(g1.equals(g2)); g2.addSeriesLabel(1, "Additional 1"); assertEquals(g1, g2); }