### Question:
StandardPieURLGenerator implements PieURLGenerator, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieURLGenerator)) { return false; } StandardPieURLGenerator that = (StandardPieURLGenerator) obj; if (!this.prefix.equals(that.prefix)) { return false; } if (!this.categoryParamName.equals(that.categoryParamName)) { return false; } if (!ObjectUtils.equal(this.indexParamName, that.indexParamName)) { return false; } return true; } StandardPieURLGenerator();  StandardPieURLGenerator(String prefix);  StandardPieURLGenerator(String prefix, String categoryParamName);  StandardPieURLGenerator(String prefix, String categoryParamName,
            String indexParamName); @Override String generateURL(PieDataset dataset, Comparable key,
            int pieIndex); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals() { StandardPieURLGenerator g1 = new StandardPieURLGenerator(); StandardPieURLGenerator g2 = new StandardPieURLGenerator(); assertEquals(g1, g2); g1 = new StandardPieURLGenerator("prefix", "category", "index"); assertFalse(g1.equals(g2)); g2 = new StandardPieURLGenerator("prefix", "category", "index"); assertEquals(g1, g2); g1 = new StandardPieURLGenerator("prefix2", "category", "index"); assertFalse(g1.equals(g2)); g2 = new StandardPieURLGenerator("prefix2", "category", "index"); assertEquals(g1, g2); g1 = new StandardPieURLGenerator("prefix2", "category2", "index"); assertFalse(g1.equals(g2)); g2 = new StandardPieURLGenerator("prefix2", "category2", "index"); assertEquals(g1, g2); g1 = new StandardPieURLGenerator("prefix2", "category2", "index2"); assertFalse(g1.equals(g2)); g2 = new StandardPieURLGenerator("prefix2", "category2", "index2"); assertEquals(g1, g2); g1 = new StandardPieURLGenerator("prefix2", "category2", null); assertFalse(g1.equals(g2)); g2 = new StandardPieURLGenerator("prefix2", "category2", null); assertEquals(g1, g2); }