SeriesRegistry implements Serializable { public void clear() { for(Iterator<BundleType> it = registry.iterator(); it.hasNext();) { it.next(); it.remove(); } }  List<BundleType> getSeriesAndFormatterList(); List<SeriesType> getSeriesList(); int size(); boolean isEmpty(); boolean add(SeriesType series, FormatterType formatter); synchronized List<BundleType> remove(SeriesType series, Class rendererClass); synchronized boolean remove(SeriesType series); void clear(); List<SeriesBundle<SeriesType, FormatterType>> getLegendEnabledItems(); boolean contains(SeriesType series, Class<? extends FormatterType> formatterClass);  }
@Test public void testClear() { seriesRegistry.add(new SimpleXYSeries("s1"), new LineAndPointFormatter()); seriesRegistry.add(new SimpleXYSeries("s2"), new LineAndPointFormatter()); assertEquals(2, seriesRegistry.size()); seriesRegistry.clear(); assertEquals(0, seriesRegistry.size()); }