@Test
public void testFlatMap() {

  List<String> list = newTestList();
  Collection<String> mapped = flatMap(list, new Function<String, Collection<String>>() {
    @Override
    public Collection<String> apply(String s) {
      return list(">", s);
    }
  });
  assertSame(mapped.getClass(), list.getClass());
  assertEquals(2, list.size());
  assertEquals(4, mapped.size());
  assertTrue(mapped.contains(">"));
  assertTrue(mapped.contains("one"));
  assertTrue(mapped.contains("two"));
}