### Question:
DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset { public int getCategoryIndex(Comparable category) { int result = -1; for (int i = 0; i < this.categoryKeys.length; i++) { if (category.equals(this.categoryKeys[i])) { result = i; break; } } return result; } DefaultIntervalCategoryDataset(double[][] starts, double[][] ends);  DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends);  DefaultIntervalCategoryDataset(String[] seriesNames,
                                          Number[][] starts,
                                          Number[][] ends);  DefaultIntervalCategoryDataset(Comparable[] seriesKeys,
                                          Comparable[] categoryKeys,
                                          Number[][] starts,
                                          Number[][] ends); @Override int getSeriesCount(); int getSeriesIndex(Comparable seriesKey); @Override Comparable getSeriesKey(int series); void setSeriesKeys(Comparable[] seriesKeys); int getCategoryCount(); @Override List<Comparable> getColumnKeys(); void setCategoryKeys(Comparable[] categoryKeys); @Override Number getValue(Comparable series, Comparable category); @Override Number getValue(int series, int category); @Override Number getStartValue(Comparable series, Comparable category); @Override Number getStartValue(int series, int category); @Override Number getEndValue(Comparable series, Comparable category); @Override Number getEndValue(int series, int category); void setStartValue(int series, Comparable category, Number value); void setEndValue(int series, Comparable category, Number value); int getCategoryIndex(Comparable category); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable columnKey); @Override int getRowIndex(Comparable rowKey); @Override List<Comparable> getRowKeys(); @Override Comparable getRowKey(int row); @Override int getColumnCount(); @Override int getRowCount(); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testGetCategoryIndex() { DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(-1, empty.getCategoryIndex("ABC")); }