SimpleContext extends AbstractContext { @Override public <T> Collection<T> findAll(Class<T> type) { return contextContent.findAll(type); } SimpleContext(SimpleContextContent contextContent); @Override T find(Class<T> type); @Override Collection<T> findAll(Class<T> type);  }
@Test public void testFindAll() { System.out.println("findAll"); MyCustomFoo foo1 = new MyCustomFoo(); content.add(foo1); assertEqualsMyCustomFooList(context, Arrays.asList(foo1)); MyCustomFoo foo2 = new MyCustomFoo(); content.add(foo2); assertEqualsMyCustomFooList(context, Arrays.asList(foo1, foo2)); content.remove(foo1); assertEqualsMyCustomFooList(context, Arrays.asList(foo2)); content.remove(foo2); assertEqualsMyCustomFooList(context, Collections.<MyCustomFoo>emptyList()); }