XYPlot plot = (XYPlot) chart.getPlot();
plot.setDomainAxis(1, new NumberAxis("X2"));
ChartPanel panel = new ChartPanel(chart);
chart.addChangeListener(this);
this.chartChangeEvents.clear();
panel.restoreAutoDomainBounds();
assertEquals(1, this.chartChangeEvents.size());
}
/**
* Checks that a call to the restoreAutoRangeBounds() method, for a plot