### Question:
DefaultStatisticalCategoryDataset extends AbstractDataset implements StatisticalCategoryDataset, RangeInfo, PublicCloneable { @Override public Range getRangeBounds(boolean includeInterval) { double lower = getRangeLowerBound(includeInterval); double upper = getRangeUpperBound(includeInterval); if (Double.isNaN(lower) && Double.isNaN(upper)) { return null; } return new Range(lower, upper); } DefaultStatisticalCategoryDataset(); @Override Number getMeanValue(int row, int column); @Override Number getValue(int row, int column); @Override Number getValue(Comparable rowKey, Comparable columnKey); @Override Number getMeanValue(Comparable rowKey, Comparable columnKey); @Override Number getStdDevValue(int row, int column); @Override Number getStdDevValue(Comparable rowKey, Comparable columnKey); @Override int getColumnIndex(Comparable key); @Override Comparable getColumnKey(int column); @Override List<Comparable> getColumnKeys(); @Override int getRowIndex(Comparable key); @Override Comparable getRowKey(int row); @Override List<Comparable> getRowKeys(); @Override int getRowCount(); @Override int getColumnCount(); void add(double mean, double standardDeviation,
                    Comparable rowKey, Comparable columnKey); void add(Number mean, Number standardDeviation,
                    Comparable rowKey, Comparable columnKey); void remove(Comparable rowKey, Comparable columnKey); void removeRow(int rowIndex); void removeRow(Comparable rowKey); void removeColumn(int columnIndex); void removeColumn(Comparable columnKey); void clear(); @Override double getRangeLowerBound(boolean includeInterval); @Override double getRangeUpperBound(boolean includeInterval); @Override Range getRangeBounds(boolean includeInterval); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testGetRangeBounds() { DefaultStatisticalCategoryDataset d = new DefaultStatisticalCategoryDataset(); assertNull(d.getRangeBounds(true)); d.add(4.5, 1.0, "R1", "C1"); assertEquals(new Range(4.5, 4.5), d.getRangeBounds(false)); assertEquals(new Range(3.5, 5.5), d.getRangeBounds(true)); d.add(0.5, 2.0, "R1", "C2"); assertEquals(new Range(0.5, 4.5), d.getRangeBounds(false)); assertEquals(new Range(-1.5, 5.5), d.getRangeBounds(true)); d.add(Double.NaN, 0.0, "R1", "C3"); assertEquals(new Range(0.5, 4.5), d.getRangeBounds(false)); assertEquals(new Range(-1.5, 5.5), d.getRangeBounds(true)); d.add(Double.NEGATIVE_INFINITY, 0.0, "R1", "C3"); assertEquals(new Range(Double.NEGATIVE_INFINITY, 4.5), d.getRangeBounds(false)); assertEquals(new Range(Double.NEGATIVE_INFINITY, 5.5), d.getRangeBounds(true)); d.add(Double.POSITIVE_INFINITY, 0.0, "R1", "C3"); assertEquals(new Range(0.5, Double.POSITIVE_INFINITY), d.getRangeBounds(false)); assertEquals(new Range(-1.5, Double.POSITIVE_INFINITY), d.getRangeBounds(true)); }