### Question:
AbstractListBackedAggregator extends AbstractTimedAggregator<T> { protected final List<T> getSeries() { return series; } AbstractListBackedAggregator(Function<List<T>, T> aggregationFunction);  AbstractListBackedAggregator(Function<List<T>, T> aggregationFunction, long interval);  AbstractListBackedAggregator(Function<List<T>, T> aggregationFunction, long interval,
            boolean useSharedTimer); @Override final void doAdd(T data); @Override String toString();  }### Answer:
@Test public void testListCreated() throws Exception { @SuppressWarnings("unchecked") TestListBackedAggregator<Object> fct = (TestListBackedAggregator<Object>) makeFunctor(); assertNotNull(fct.getSeries()); assertEquals(fct.getSeries().size(), 0); }
@Test public void testAdd() throws Exception { @SuppressWarnings("unchecked") TestListBackedAggregator<Object> fct = (TestListBackedAggregator<Object>) makeFunctor(); int calls = 31; for (int i = 1; i <= calls; i++) { fct.add(new Object()); assertEquals(fct.getSeries().size(), i); assertEquals(fct.callsCreateList, 0); } }
@Test public void testReset() throws Exception { @SuppressWarnings("unchecked") TestListBackedAggregator<Object> fct = (TestListBackedAggregator<Object>) makeFunctor(); int calls = 31; for (int i = 1; i <= calls; i++) { fct.reset(); assertEquals(fct.getSeries().size(), 0); assertEquals(fct.callsCreateList, 0); } }