@Test
public void testFlatMap2() {

  final List<Object> l = list((Object) 1);
  final List<String> r1 = mlist(l).bind(new Function<Object, Option<String>>() {
    @Override public Option<String> apply(Object o) {
      return some("x");
    }
  }).value();
  assertEquals(1, r1.size());
  assertEquals("x", r1.get(0));
  final List<String> r2 = mlist(l).bind(new Function<Object, Option<String>>() {
    @Override public Option<String> apply(Object o) {
      return none();
    }
  }).value();
  assertEquals(0, r2.size());
}