### Question:
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { public void removeAllSeries() { if (this.data.size() == 0) { return; } for (OHLCSeries series : this.data) { series.removeChangeListener(this); } this.data.clear(); fireDatasetChanged(); } OHLCSeriesCollection(); TimePeriodAnchor getXPosition(); void setXPosition(TimePeriodAnchor anchor); void addSeries(OHLCSeries series); @Override int getSeriesCount(); OHLCSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); @Override double getOpenValue(int series, int item); @Override Number getOpen(int series, int item); @Override double getCloseValue(int series, int item); @Override Number getClose(int series, int item); @Override double getHighValue(int series, int item); @Override Number getHigh(int series, int item); @Override double getLowValue(int series, int item); @Override Number getLow(int series, int item); @Override Number getVolume(int series, int item); @Override double getVolumeValue(int series, int item); void removeSeries(int index); boolean removeSeries(OHLCSeries series); void removeAllSeries(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testRemoveAllSeries() { OHLCSeriesCollection c1 = new OHLCSeriesCollection(); c1.addChangeListener(this); this.lastEvent = null; c1.removeAllSeries(); assertNull(this.lastEvent); OHLCSeries s1 = new OHLCSeries("Series 1"); OHLCSeries s2 = new OHLCSeries("Series 2"); c1.addSeries(s1); c1.addSeries(s2); c1.removeAllSeries(); assertEquals(0, c1.getSeriesCount()); assertNotNull(this.lastEvent); this.lastEvent = null; }