### Question:
DataElementCriteriaBinner implements Binner<DataElement> { @Override public void removeAll(Collection<? extends DataElement> dataItems) { for (DataElement element : dataItems) { remove(element); } } DataElementCriteriaBinner(MantleToolbox mantleBox, BinCriteria criteria, DataTypeInfo layer); @Override Bin<DataElement> add(DataElement data); @Override void addAll(Collection<? extends DataElement> dataItems); @Override void clear(); @Override List<Bin<DataElement>> getBins(); @Override Map<Object, Bin<DataElement>> getBinsMap(); List<BinCriteriaElement> getCriteria(); @Override void rebin(); @Override Bin<DataElement> remove(DataElement data); @Override void removeAll(Collection<? extends DataElement> dataItems); @Override void removeIf(Predicate<? super DataElement> filter); @Override void addBin(Bin<DataElement> bin); @Override void setListener(ListDataListener<Bin<DataElement>> listener);  }### Answer:
@Test public void testRemoveAll() { EasyMockSupport support = new EasyMockSupport(); DataTypeInfo dataType = createDataType(support); MantleToolbox mantleBox = createMantleBox(support); List<DataElement> data = createFruitData(dataType); BinCriteria criteria = createFruitBinCriteria(); support.replayAll(); DataElementCriteriaBinner binner = new DataElementCriteriaBinner(mantleBox, criteria, dataType); binner.addAll(data); List<Bin<DataElement>> bins = binner.getBins(); assertEquals(7, bins.size()); for (DataElement element : data) { binner.remove(element); } assertTrue(binner.getBins().isEmpty()); support.verifyAll(); }