@Test
@SuppressWarnings("unchecked")
public void filter() {

  Item item = new Item(2);
  List<Item> items = new ArrayList<Item>();
  items.add(item);
  CollectionItem<Item> collectionItem = new CollectionItem<Item>(items);
  doReturn(items).when(filter).filter(anyList());
  Collection<Item> filteredItems = collectionItem.filter(filter);
  assertTrue(filteredItems.contains(item));
}