### Question:
FilteredGenerator extends BaseGenerator<E> { public void run(Procedure<? super E> proc) { getWrappedGenerator().run(new ConditionalProcedure<E>(pred, proc)); } FilteredGenerator(Generator<? extends E> wrapped, Predicate<? super E> pred); void run(Procedure<? super E> proc); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testGenerate() { final List<Integer> evenNumbers = new ArrayList<Integer>(); filteredGenerator.run(new Procedure<Integer>() { public void run(Integer obj) { evenNumbers.add(obj); } }); assertEquals(4, evenNumbers.size()); List<Integer> expected = Arrays.asList(2, 4, 6, 8); assertEquals(expected, evenNumbers); }