@Test
public void testOnRender() throws Exception {

    BubbleFormatter formatter = spy(new BubbleFormatter());
    BubbleRenderer br = formatter.getRendererInstance(xyPlot);
    BubbleRenderer renderer = spy(br);
    doReturn(renderer.getClass()).when(formatter).getRendererClass();
    doReturn(renderer).when(formatter).getRendererInstance(any(XYPlot.class));
    BubbleSeries bs = new BubbleSeries(1, 2, 3, 4, 5, 6, 7, 8, 9);
    xyPlot.addSeries(bs, formatter);
    renderer.onRender(canvas, plotArea, bs, formatter, renderStack);
}