/**
* Some checks for the addOrUpdate() method.
*/
public void testAddOrUpdate() {
XYSeries series = new XYSeries("S1", true, false);
XYDataItem old = series.addOrUpdate(new Long(1), new Long(2));
assertTrue(old == null);
assertEquals(1, series.getItemCount());
assertEquals(new Long(2), series.getY(0));
old = series.addOrUpdate(new Long(2), new Long(3));
assertTrue(old == null);
assertEquals(2, series.getItemCount());
assertEquals(new Long(3), series.getY(1));
old = series.addOrUpdate(new Long(1), new Long(99));
assertEquals(new XYDataItem(new Long(1), new Long(2)), old);
assertEquals(2, series.getItemCount());
assertEquals(new Long(99), series.getY(0));
assertEquals(new Long(3), series.getY(1));
}