@Test
public void testMap() {

  List<Integer> list = asList(1, 2, 3);
  List<String> mapped = mlist(list).map(new Function<Integer, Integer>() {
    @Override
    public Integer apply(Integer a) {
      return a * a;
    }
  }).map(new Function<Integer, String>() {
    @Override
    public String apply(Integer a) {
      return a + " " + a;
    }
  }).value();
  assertEquals("1 1", mapped.get(0));
  assertEquals("4 4", mapped.get(1));
  assertEquals("9 9", mapped.get(2));
}