### Question:
StandardCategoryURLGenerator implements CategoryURLGenerator,
        Serializable { @Override public String generateURL(CategoryDataset dataset, int series, int category) { String url = this.prefix; Comparable seriesKey = dataset.getRowKey(series); Comparable categoryKey = dataset.getColumnKey(category); boolean firstParameter = !url.contains("?"); url += firstParameter ? "?" : "&amp;"; try { url += this.seriesParamName + "=" + URLEncoder.encode( seriesKey.toString(), "UTF-8"); url += "&amp;" + this.categoryParamName + "=" + URLEncoder.encode(categoryKey.toString(), "UTF-8"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } return url; } StandardCategoryURLGenerator();  StandardCategoryURLGenerator(String prefix);  StandardCategoryURLGenerator(String prefix, 
            String seriesParamName, String categoryParamName); @Override String generateURL(CategoryDataset dataset, int series,
            int category); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testGenerateURL() { StandardCategoryURLGenerator g1 = new StandardCategoryURLGenerator(); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(1.0, "R1", "C1"); dataset.addValue(2.0, "R2", "C2"); dataset.addValue(3.0, "R&", "C&"); assertEquals("index.html?series=R1&amp;category=C1", g1.generateURL(dataset, 0, 0)); assertEquals("index.html?series=R1&amp;category=C2", g1.generateURL(dataset, 0, 1)); assertEquals("index.html?series=R2&amp;category=C2", g1.generateURL(dataset, 1, 1)); assertEquals("index.html?series=R%26&amp;category=C%26", g1.generateURL(dataset, 2, 2)); }