SeriesRegistry implements Serializable { protected List<SeriesBundle<SeriesType, FormatterType>> get(SeriesType series) { List<SeriesBundle<SeriesType, FormatterType>> results = new ArrayList<>(); for(SeriesBundle<SeriesType, FormatterType> thisPair : registry) { if(thisPair.getSeries() == series) { results.add(thisPair); } } return results; }  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 testGet() { Series s1 = new SimpleXYSeries("s1"); Formatter f1 = new LineAndPointFormatter(); Series s2 = new SimpleXYSeries("s2"); Formatter f2 = new LineAndPointFormatter(); Formatter f3 = new LineAndPointFormatter(); seriesRegistry.add(s1, f1); seriesRegistry.add(s1, f3); seriesRegistry.add(s2, f2); assertEquals(2, seriesRegistry.get(s1).size()); assertEquals(1, seriesRegistry.get(s2).size()); }