### Question:
CandlestickRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, true); } CandlestickRenderer();  CandlestickRenderer(double candleWidth);  CandlestickRenderer(double candleWidth, boolean drawVolume,
            XYToolTipGenerator toolTipGenerator); double getCandleWidth(); void setCandleWidth(double width); double getMaxCandleWidthInMilliseconds(); void setMaxCandleWidthInMilliseconds(double millis); int getAutoWidthMethod(); void setAutoWidthMethod(int autoWidthMethod); double getAutoWidthFactor(); void setAutoWidthFactor(double autoWidthFactor); double getAutoWidthGap(); void setAutoWidthGap(double autoWidthGap); Paint getUpPaint(); void setUpPaint(Paint paint); Paint getDownPaint(); void setDownPaint(Paint paint); boolean getDrawVolume(); void setDrawVolume(boolean flag); Paint getVolumePaint(); void setVolumePaint(Paint paint); boolean getUseOutlinePaint(); void setUseOutlinePaint(boolean use); @Override Range findRangeBounds(XYDataset dataset); @Override XYItemRendererState initialise(Graphics2D g2,
                                          Rectangle2D dataArea,
                                          XYPlot plot,
                                          XYDataset dataset,
                                          PlotRenderingInfo info); @Override void drawItem(Graphics2D g2, XYItemRendererState state,
            Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
            ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset,
            int series, int item, CrosshairState crosshairState, int pass); @Override boolean equals(Object obj); @Override Object clone(); static final int WIDTHMETHOD_AVERAGE; static final int WIDTHMETHOD_SMALLEST; static final int WIDTHMETHOD_INTERVALDATA; }### Answer:
@Test public void testFindRangeBounds() { CandlestickRenderer renderer = new CandlestickRenderer(); OHLCDataItem item1 = new OHLCDataItem(new Date(1L), 2.0, 4.0, 1.0, 3.0, 100); OHLCDataset dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {item1}); Range range = renderer.findRangeBounds(dataset); assertEquals(new Range(1.0, 4.0), range); OHLCDataItem item2 = new OHLCDataItem(new Date(1L), -1.0, 3.0, -1.0, 3.0, 100); dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {item1, item2}); range = renderer.findRangeBounds(dataset); assertEquals(new Range(-1.0, 4.0), range); dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {}); range = renderer.findRangeBounds(dataset); assertNull(range); range = renderer.findRangeBounds(null); assertNull(range); }