### Question:
XYBlockRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public Range findDomainBounds(XYDataset dataset) { if (dataset == null) { return null; } Range r = DatasetUtilities.findDomainBounds(dataset, false); if (r == null) { return null; } return new Range(r.getLowerBound() + this.xOffset, r.getUpperBound() + this.blockWidth + this.xOffset); } XYBlockRenderer(); double getBlockWidth(); void setBlockWidth(double width); double getBlockHeight(); void setBlockHeight(double height); RectangleAnchor getBlockAnchor(); void setBlockAnchor(RectangleAnchor anchor); PaintScale getPaintScale(); void setPaintScale(PaintScale scale); @Override Range findDomainBounds(XYDataset dataset); @Override Range findRangeBounds(XYDataset dataset); @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();  }### Answer:
@Test public void testBug1766646A() { XYBlockRenderer r = new XYBlockRenderer(); Range range = r.findDomainBounds(null); assertNull(range); DefaultXYZDataset emptyDataset = new DefaultXYZDataset(); range = r.findDomainBounds(emptyDataset); assertNull(range); }
@Test public void testFindDomainBounds() { XYBlockRenderer renderer = new XYBlockRenderer(); assertNull(renderer.findRangeBounds(null)); XYSeriesCollection dataset = new XYSeriesCollection(); XYSeries series = new XYSeries("S1"); series.add(1.0, null); dataset.addSeries(series); Range r = renderer.findDomainBounds(dataset); assertEquals(0.5, r.getLowerBound(), EPSILON); assertEquals(1.5, r.getUpperBound(), EPSILON); dataset.removeAllSeries(); r = renderer.findDomainBounds(dataset); assertNull(r); }