@Test
public void testLazyFlatMap2() {

  List<Integer> eval = mlazy(asList(1, 2, 3))
          .flatMap(new Function<Integer, Iterator<Integer>>() {
            @Override
            public Iterator<Integer> apply(Integer integer) {
              if (integer != 2) {
                return asList(1, 2, 3).iterator();
              } else {
                return java.util.Collections.<Integer>emptyList().iterator();
              }
            }
          })
          .flatMap(new Function<Integer, Iterator<Integer>>() {
            @Override
            public Iterator<Integer> apply(Integer integer) {
              return asList(integer * integer).iterator();
            }
          })
          .eval();
  assertArrayEquals(array(1, 4, 9, 1, 4, 9), Collections.toArray(Integer.class, eval));
}